Controller class for taxonomy vocabularies.
This extends the DrupalDefaultEntityController class, adding required special handling for taxonomy vocabulary objects.
Hierarchy
Properties
| Name | Description |
|---|---|
| DrupalDefaultEntityController::$cache | Whether this entity type should use the static cache. |
| DrupalDefaultEntityController::$entityCache | Static cache of entities. |
| DrupalDefaultEntityController::$entityInfo | Array of information about the entity. |
| DrupalDefaultEntityController::$entityType | Entity type for this controller instance. |
| DrupalDefaultEntityController::$hookLoadArguments | Additional arguments to pass to hook_TYPE_load(). |
| DrupalDefaultEntityController::$idKey | Name of the entity's ID field in the entity database table. |
| DrupalDefaultEntityController::$revisionKey | Name of entity's revision database table field, if it supports revisions. |
| DrupalDefaultEntityController::$revisionTable | The table that stores revisions, if the entity supports revisions. |
Functions & methods
| Name | Description |
|---|---|
| DrupalDefaultEntityController::attachLoad | Attaches data to entities upon loading. This will attach fields, if the entity is fieldable. It calls hook_entity_load() for modules which need to add data to all entities. It also calls hook_TYPE_load() on the loaded entities. For… |
| DrupalDefaultEntityController::cacheGet | Gets entities from the static cache. |
| DrupalDefaultEntityController::cacheSet | Stores entities in the static entity cache. |
| DrupalDefaultEntityController::load | Implements DrupalEntityControllerInterface::load(). Overrides DrupalEntityControllerInterface::load |
| DrupalDefaultEntityController::resetCache | Implements DrupalEntityControllerInterface::resetCache(). Overrides DrupalEntityControllerInterface::resetCache |
| DrupalDefaultEntityController::__construct | Constructor: sets basic variables. Overrides DrupalEntityControllerInterface::__construct |
| TaxonomyVocabularyController::buildQuery | Builds the query to load the entity. Overrides DrupalDefaultEntityController::buildQuery |
File
- modules/
taxonomy/ taxonomy.module, line 1171 - Enables the organization of content into categories.
View source
class TaxonomyVocabularyController extends DrupalDefaultEntityController {
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;
}
}