Interface for entity controller classes.
All entity controller classes specified via the 'controller class' key returned by hook_entity_info() or hook_entity_info_alter() have to implement this interface.
Most simple, SQL-based entity controllers will do better by extending DrupalDefaultEntityController instead of implementing this interface directly.
Implemented by
Functions & methods
| Name | Description |
|---|---|
| DrupalEntityControllerInterface::load | Loads one or more entities. |
| DrupalEntityControllerInterface::resetCache | Resets the internal, static entity cache. |
| DrupalEntityControllerInterface::__construct | Constructor. |
File
- includes/
entity.inc, line 14
View source
interface DrupalEntityControllerInterface {
/**
* Constructor.
*
* @param $entityType
* The entity type for which the instance is created.
*/
public function __construct($entityType);
/**
* Resets the internal, static entity cache.
*
* @param $ids
* (optional) If specified, the cache is reset for the entities with the
* given ids only.
*/
public function resetCache(array $ids = NULL);
/**
* Loads one or more entities.
*
* @param $ids
* An array of entity IDs, or FALSE to load all entities.
* @param $conditions
* An array of conditions in the form 'field' => $value.
*
* @return
* An array of entity objects indexed by their ids. When no results are
* found, an empty array is returned.
*/
public function load($ids = array(), $conditions = array());
}