You are here

protected function OrganigramsController::buildQuery in Organigrams 7

Builds the query to load the entity.

Parameters

array $ids: An array of entity IDs, or FALSE to load all entities.

array $conditions: An array of conditions in the form 'field' => $value.

mixed $revision_id: The ID of the revision to load, or FALSE if this query is asking for the most current revision(s).

Return value

SelectQuery A SelectQuery object for loading the entity.

Overrides EntityAPIController::buildQuery

File

./organigrams.module, line 2096
Defines the organigrams functions and entity types.

Class

OrganigramsController
Controller class for organigrams.

Code

protected function buildQuery($ids, $conditions = array(), $revision_id = FALSE) {
  $query = parent::buildQuery($ids, $conditions, $revision_id);
  $query
    ->addTag('translatable');
  $query
    ->orderBy('base.weight');
  $query
    ->orderBy('base.name');
  return $query;
}