public function EntityFieldQuery::entityOrderBy
public EntityFieldQuery::entityOrderBy($name, $direction = 'ASC')
Orders the result set by entity-generic metadata.
If called multiple times, the query will order by each specified column in the order this method is called.
Note: The "comment" and "taxonomy_term" entity types don't support ordering by bundle. For "taxonomy_term", propertyOrderBy('vid') can be used instead.
Parameters
$name: 'entity_type', 'bundle', 'revision_id' or 'entity_id'.
$direction: The direction to sort. Legal values are "ASC" and "DESC".
Return value
EntityFieldQuery The called object.
File
- includes/entity.inc, line 922
Class
- EntityFieldQuery
- Retrieves entities matching a given set of conditions.
Code
public function entityOrderBy($name, $direction = 'ASC') { $this->order[] = array( 'type' => 'entity', 'specifier' => $name, '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::entityOrderBy/7.x