You are here

interface FlexiformFormEntityManagerInterface in Flexiform 7

Interface for form entities.

Hierarchy

Expanded class hierarchy of FlexiformFormEntityManagerInterface

All classes that implement FlexiformFormEntityManagerInterface

File

includes/flexiform.form_entity_manager.inc, line 10
Contains the default entity manager for flexiforms.

View source
interface FlexiformFormEntityManagerInterface {

  /**
   * Set the base entity.
   *
   * @param $entity
   *   The base entity object.
   * @param $base_entity_namespace
   *   The namespace of the base entity, usually 'base entity'.
   */
  public function setBaseEntity($entity, $base_entity_namespace);

  /**
   * Get the base entity.
   *
   * @return Entity|stdClass
   *   The base entity as set by setBaseEntity().
   *
   * @see FlexiformFormEntityManagerInterface::setBaseEntity()
   */
  public function getBaseEntity();

  /**
   * Prepare the entities needed for the form, either by creating or loading.
   */
  public function prepareEntities();

  /**
   * Prepare an individual entity.
   *
   * @param $namespace
   *   The namespace of the entity to be prepared.
   */
  public function prepareEntity($namespace);

  /**
   * Get the entities.
   *
   * @return array
   *   An array of all the entities ready to be used in this form.
   */
  public function getEntities();

  /**
   * Get an entity from the set.
   *
   * This method will prepare the entity if it has not already been prepared.
   *
   * @param string $namespace
   *   The namespace of the required entity.
   *
   * @return Entity|stdClass
   *   The prepared entity object.
   */
  public function getEntity($namespace);

}

Members

Namesort descending Modifiers Type Description Overrides
FlexiformFormEntityManagerInterface::getBaseEntity public function Get the base entity. 1
FlexiformFormEntityManagerInterface::getEntities public function Get the entities. 1
FlexiformFormEntityManagerInterface::getEntity public function Get an entity from the set. 1
FlexiformFormEntityManagerInterface::prepareEntities public function Prepare the entities needed for the form, either by creating or loading. 1
FlexiformFormEntityManagerInterface::prepareEntity public function Prepare an individual entity. 1
FlexiformFormEntityManagerInterface::setBaseEntity public function Set the base entity. 1