You are here

public function FlexiformFormEntityManagerDefault::getEntity in Flexiform 7

Get an entity from the set.

This method will prepare the entity if it has not already been prepared.

Parameters

string $namespace: The namespace of the required entity.

Return value

Entity|stdClass The prepared entity object.

Overrides FlexiformFormEntityManagerInterface::getEntity

2 calls to FlexiformFormEntityManagerDefault::getEntity()
FlexiformFormEntityManagerDefault::executeCallbacks in includes/flexiform.form_entity_manager.inc
Execute Save Callbacks.
FlexiformFormEntityManagerDefault::saveEntities in includes/flexiform.form_entity_manager.inc
Save Entities.

File

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

Class

FlexiformFormEntityManagerDefault
Class that manages entities in a flexiform.

Code

public function getEntity($namespace) {
  if (empty($this->prepared[$namespace])) {
    $this
      ->prepareEntity($namespace);
  }
  if (isset($this->entities[$namespace])) {
    return $this->entities[$namespace];
  }
  return FALSE;
}