class FlexiformFormEntityLegacy in Flexiform 7
Legacy form entity class.
Hierarchy
- class \FlexiformFormEntityBase implements FlexiformFormEntityInterface
- class \FlexiformFormEntityLegacy
Expanded class hierarchy of FlexiformFormEntityLegacy
1 string reference to 'FlexiformFormEntityLegacy'
- flexiform_entity_getter_info in ./
flexiform.module - Get info about all entity getters
File
- includes/
form_entity/ legacy.form_entity.inc, line 10 - Contains Legacy Form Entity Class to Utilise Old Getters and Setters.
View source
class FlexiformFormEntityLegacy extends FlexiformFormEntityBase {
/**
* {@inheritdoc}
*/
public function getEntity() {
parent::getEntity();
$getter = $this->getter;
$base_entity = $this->manager
->getBaseEntity();
$entities = $this->manager
->getEntitiesRaw();
if (isset($getter['file']) && file_exists(drupal_get_path('module', $getter['module']) . '/' . $getter['file'])) {
include_once drupal_get_path('module', $getter['module']) . '/' . $getter['file'];
}
$callback = $getter['getter callback'];
if (function_exists($callback)) {
// Todo: Sort out params
return $callback($this->manager
->getBuilder()
->getFlexiform(), $base_entity, $entities, $this->entity_namespace, $getter);
}
}
/**
* {@inheritdoc}
*/
public function saveEntity($entity) {
$getter = $this->getter;
$base_entity = $this->manager
->getBaseEntity();
$entities = $this->manager
->getEntitiesRaw();
if (isset($getter['file']) && file_exists(drupal_get_path('module', $getter['module']) . '/' . $getter['file'])) {
include_once drupal_get_path('module', $getter['module']) . '/' . $getter['file'];
}
$callback = $getter['setter callback'];
if (function_exists($callback)) {
$callback($this->manager
->getBuilder()
->getFlexiform(), $base_entity, $entity, $this->entity_type, $entities, $this->entity_namespace, $getter);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FlexiformFormEntityBase:: |
public | property | The namespace of this entity. | |
FlexiformFormEntityBase:: |
public | property | The type of this entity. | |
FlexiformFormEntityBase:: |
public | property | Details of the getter. | |
FlexiformFormEntityBase:: |
public | property | The Flexiform Entity Manager | |
FlexiformFormEntityBase:: |
public | property | The settings for this entity on the flexiform. | |
FlexiformFormEntityBase:: |
public | function | Check bundle. | |
FlexiformFormEntityBase:: |
public | function |
Get the Configuration Form. Overrides FlexiformFormEntityInterface:: |
3 |
FlexiformFormEntityBase:: |
public | function |
Submit the Configuration Form. Overrides FlexiformFormEntityInterface:: |
|
FlexiformFormEntityBase:: |
public | function |
Validate the configuration form. Overrides FlexiformFormEntityInterface:: |
|
FlexiformFormEntityBase:: |
public | function | Get a Parameter From the Entity Manager. | |
FlexiformFormEntityBase:: |
public | function | Get a Parameter's entity settings from the Entity Manager. | |
FlexiformFormEntityBase:: |
public | function | Get the entity type of a parameter. | |
FlexiformFormEntityBase:: |
public | function | Construct a Flexiform Form Entity class. | |
FlexiformFormEntityLegacy:: |
public | function |
Get the entity for the form. Overrides FlexiformFormEntityBase:: |
|
FlexiformFormEntityLegacy:: |
public | function |
Save the entity upon submission of the form. Overrides FlexiformFormEntityBase:: |