public function EntityFieldQuery::propertyOrderBy
public EntityFieldQuery::propertyOrderBy($column, $direction = 'ASC')
Orders the result set by an entity-specific property.
An $entity_type must be specified by calling EntityFieldCondition::entityCondition('entity_type', $entity_type) before executing the query.
If called multiple times, the query will order by each specified column in the order this method is called.
Parameters
$column: The column on which to order.
$direction: The direction to sort. Legal values are "ASC" and "DESC".
Return value
EntityFieldQuery The called object.
File
- includes/entity.inc, line 991
Class
- EntityFieldQuery
- Retrieves entities matching a given set of conditions.
Code
public function propertyOrderBy($column, $direction = 'ASC') { $this->order[] = array( 'type' => 'property', 'specifier' => $column, 'direction' => $direction, ); return $this; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!entity.inc/function/EntityFieldQuery::propertyOrderBy/7.x