interface DrupalEntityControllerInterface

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.

Hierarchy

Expanded class hierarchy of DrupalEntityControllerInterface

All classes that implement DrupalEntityControllerInterface

File

drupal-7.x/includes/entity.inc, line 14

View source
interface DrupalEntityControllerInterface {

  /**
   * 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());
}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
DrupalEntityControllerInterface::load public function Loads one or more entities.
DrupalEntityControllerInterface::resetCache public function Resets the internal, static entity cache.