You are here

interface EntityExampleBasicControllerInterface in Examples for Developers 7

EntityExampleBasicControllerInterface definition.

We create an interface here because anyone could come along and use hook_entity_info_alter() to change our controller class. We want to let them know what methods our class needs in order to function with the rest of the module, so here's a handy list.

Hierarchy

Expanded class hierarchy of EntityExampleBasicControllerInterface

All classes that implement EntityExampleBasicControllerInterface

See also

hook_entity_info_alter()

Related topics

File

entity_example/entity_example.module, line 505
Implements the basic functionality required to create and display an entity.

View source
interface EntityExampleBasicControllerInterface extends DrupalEntityControllerInterface {

  /**
   * Create an entity.
   */
  public function create();

  /**
   * Save an entity.
   *
   * @param object $entity
   *   The entity to save.
   */
  public function save($entity);

  /**
   * Delete an entity.
   *
   * @param object $entity
   *   The entity to delete.
   */
  public function delete($entity);

}

Members

Namesort descending Modifiers Type Description Overrides
DrupalEntityControllerInterface::load public function Loads one or more entities. 1
DrupalEntityControllerInterface::resetCache public function Resets the internal, static entity cache. 1
EntityExampleBasicControllerInterface::create public function Create an entity. 1
EntityExampleBasicControllerInterface::delete public function Delete an entity. 1
EntityExampleBasicControllerInterface::save public function Save an entity. 1