You are here

protected function AbstractFieldSynonymsBehavior::entityItems in Synonyms 7

Retrieve items of the underlying field in this behavior implementation.

Parameters

object $entity: Entity whose items should be retrieved

string $langcode: Language code for which to retrieve items from the entity, if one is known

Return value

array Array of items that provided entity has in the field on which behavior implementation is set up

9 calls to AbstractFieldSynonymsBehavior::entityItems()
CommercePriceSynonymsBehavior::extractSynonyms in synonyms_commerce/includes/CommercePriceSynonymsBehavior.class.inc
Extract synonyms from an entity within a specific behavior implementation.
CommerceProductReferenceSynonymsBehavior::extractSynonyms in synonyms_commerce/includes/CommerceProductReferenceSynonymsBehavior.class.inc
Extract synonyms from an entity within a specific behavior implementation.
CommerceProductReferenceSynonymsBehavior::mergeEntityAsSynonym in synonyms_commerce/includes/CommerceProductReferenceSynonymsBehavior.class.inc
Add an entity as a synonym into another entity.
EntityReferenceSynonymsBehavior::extractSynonyms in synonyms_provider_field/includes/EntityReferenceSynonymsBehavior.class.inc
Extract synonyms from an entity within a specific behavior implementation.
EntityReferenceSynonymsBehavior::mergeEntityAsSynonym in synonyms_provider_field/includes/EntityReferenceSynonymsBehavior.class.inc
Add an entity as a synonym into another entity.

... See full list

File

synonyms_provider_field/includes/AbstractFieldSynonymsBehavior.class.inc, line 56
Definition of AbstractFieldSynonymsBehavior class.

Class

AbstractFieldSynonymsBehavior
Abstract class for providing synonyms from fields attached to entities.

Code

protected function entityItems($entity, $langcode = NULL) {
  $items = field_get_items($this->instance['entity_type'], $entity, $this->field['field_name'], $langcode);
  return is_array($items) ? $items : array();
}