abstract class EntityShareTaxonomyAbstract in Entity Share 7
Abstract class for Taxonomy import/export management.
Hierarchy
- class \EntityShareTaxonomyAbstract
Expanded class hierarchy of EntityShareTaxonomyAbstract
File
- modules/
entity_share_taxonomy/ includes/ entity_share_taxonomy.abstract.inc, line 11 - Class for handling Taxonomy Import/Export Abstract.
View source
abstract class EntityShareTaxonomyAbstract {
/**
* Field datas.
*
* @var array
* Data of the field.
*/
protected $fieldData;
/**
* Field name.
*
* @var string
* Machine name of the field.
*/
protected $fieldName;
/**
* Field type.
*
* @var string
* Type of the field.
*/
protected $fieldType;
/**
* Entity object.
*
* @var object
* Entity.
*/
protected $entity;
/**
* Metadatas of the field.
*
* @var array
* Field info.
*/
protected $fieldInfo;
/**
* Field language.
*
* @var string
* Language.
*/
protected $fieldLang;
/**
* Delta of the field.
*
* @var int
* Delta of the field (0, 1 etc).
*/
protected $delta;
/**
* Entity share object.
*
* @var EntityShareEntityAbstract
* EntityShareEntity object.
*/
protected $entityShareEntity;
/**
* Type of field managed by the class.
*
* @var array
* Type of field types managed.
*/
protected $managedFieldTypes = array(
'taxonomy_term_reference',
);
/**
* Entity type of the current field.
*
* @var string
* Entity type of the field.
*/
protected $fieldEntityType = 'taxonomy_term';
/**
* Constructor. Initialize properties.
*
* @param array $field_data
* Datas of the field.
* @param string $field_name
* Name of the field.
* @param string $field_type
* Type of the field.
* @param object $entity
* Current entity to import or export.
* @param array $field_info
* Info of the field.
* @param string $lang
* Language of the field.
* @param int $delta
* Delta of the field.
* @param EntityShareEntityAbstract $entity_share_entity
* The EntityShareEntityAbstract object.
*/
public function __construct(array &$field_data, $field_name, $field_type, $entity, array $field_info, $lang, $delta, EntityShareEntityAbstract $entity_share_entity) {
$this->fieldData =& $field_data;
$this->fieldName = $field_name;
$this->fieldType = $field_type;
$this->entity = $entity;
$this->fieldInfo = $field_info;
$this->fieldLang = $lang;
$this->fieldDelta = $delta;
$this->entityShareEntity = $entity_share_entity;
}
/**
* Check if the field type is managed.
*
* @return bool
* TRUE if the current module can handle the field type, FALSE otherwise.
*/
public function isManagedFieldType() {
return in_array($this->fieldType, $this->managedFieldTypes);
}
}