public function FlexiformFormEntityManagerDefault::getEntityHandler in Flexiform 7
Get the entity handler class.
Parameters
$namespace: The namespace of the entity to get.
Return value
FlexiformFormEntityInterface The form entity handler object.
2 calls to FlexiformFormEntityManagerDefault::getEntityHandler()
- FlexiformFormEntityManagerDefault::prepareEntity in includes/
flexiform.form_entity_manager.inc - Prepare an individual entity.
- FlexiformFormEntityManagerDefault::saveEntities in includes/
flexiform.form_entity_manager.inc - Save Entities.
File
- includes/
flexiform.form_entity_manager.inc, line 197 - Contains the default entity manager for flexiforms.
Class
- FlexiformFormEntityManagerDefault
- Class that manages entities in a flexiform.
Code
public function getEntityHandler($namespace) {
if ($getter = $this
->getEntityGetterInfo($namespace)) {
$class = $getter['class'];
if (empty($class) || !class_exists($class) || !in_array('FlexiformFormEntityInterface', class_implements($class))) {
throw new Exception(t('Form Entity Class %class not found or not suitable using %getter', array(
'%getter' => $getter['label'],
'%class' => $class,
)));
}
return new $class($this, $namespace, $getter);
}
return FALSE;
}