public function EntityMetadataWrapper::__construct in Entity API 7
Construct a new wrapper object.
Parameters
$type: The type of the passed data.
$data: Optional. The data to wrap.
$info: Optional. Used internally to pass info about properties down the tree.
2 calls to EntityMetadataWrapper::__construct()
- EntityListWrapper::__construct in includes/
entity.wrapper.inc - Construct a new wrapper object.
- EntityStructureWrapper::__construct in includes/
entity.wrapper.inc - Construct a new EntityStructureWrapper object.
2 methods override EntityMetadataWrapper::__construct()
- EntityListWrapper::__construct in includes/
entity.wrapper.inc - Construct a new wrapper object.
- EntityStructureWrapper::__construct in includes/
entity.wrapper.inc - Construct a new EntityStructureWrapper object.
File
- includes/
entity.wrapper.inc, line 28 - Provides wrappers allowing easy usage of the entity metadata.
Class
- EntityMetadataWrapper
- A common base class for all wrappers.
Code
public function __construct($type, $data = NULL, $info = array()) {
$this->type = $type;
$this->info = $info + array(
'langcode' => NULL,
);
$this->info['type'] = $type;
if (isset($data)) {
$this
->set($data);
}
}