public function EntityStructureWrapper::__construct in Entity API 7
Construct a new EntityStructureWrapper object.
Parameters
$type: The type of the passed data.
$data: Optional. The data to wrap.
$info: Used to for specifying metadata about the data and internally to pass info about properties down the tree. For specifying metadata known keys are:
- property info: An array of info about the properties of the wrapped data structure. It has to contain an array of property info in the same structure as used by hook_entity_property_info().
Overrides EntityMetadataWrapper::__construct
1 call to EntityStructureWrapper::__construct()
- EntityDrupalWrapper::__construct in includes/
entity.wrapper.inc - Construct a new EntityDrupalWrapper object.
1 method overrides EntityStructureWrapper::__construct()
- EntityDrupalWrapper::__construct in includes/
entity.wrapper.inc - Construct a new EntityDrupalWrapper object.
File
- includes/
entity.wrapper.inc, line 321 - Provides wrappers allowing easy usage of the entity metadata.
Class
- EntityStructureWrapper
- Provides a general wrapper for any data structure. For this to work the metadata has to be passed during construction.
Code
public function __construct($type, $data = NULL, $info = array()) {
parent::__construct($type, $data, $info);
$this->info += array(
'property defaults' => array(),
);
$info += array(
'property info' => array(),
);
$this->propertyInfo['properties'] = $info['property info'];
}