public function CerField::__construct in Corresponding Entity References 7.3
Constructor. Pretty self-explanatory!
Overrides FieldInstance::__construct
1 method overrides CerField::__construct()
- CerProfile2Field::__construct in extensions/
cer_profile2/ profile2.inc - @override CerField::__construct().
File
- includes/
CerField.inc, line 47 - Contains the base class for CER field plugins.
Class
- CerField
- @class Represents a single field instance.
Code
public function __construct(array $plugin) {
// Store a copy of our plugin definition.
$this->plugin = $plugin;
list($entity_type, $bundle, $field_name) = explode(':', $plugin['identifier']);
parent::__construct($entity_type, $bundle, $field_name);
// Store a copy of the field settings for convenience. At the time of this
// writing, this is needed by the Entity Reference, Node Reference,
// and Term Reference plugins.
$info = field_info_field($this->name);
$this->settings = $info['settings'];
$type_info = field_info_field_types($info['type']);
$this->fieldTypeLabel = $type_info['label'];
}