Drupal 8  8.0.2
EntityReferenceFieldItemList Class Reference
Inheritance diagram for EntityReferenceFieldItemList:

Public Member Functions

 getConstraints ()
 
 referencedEntities ()
 
 defaultValuesFormSubmit (array $element, array &$form, FormStateInterface $form_state)
 
- Public Member Functions inherited from FieldItemList
 getEntity ()
 
 setLangcode ($langcode)
 
 getLangcode ()
 
 getFieldDefinition ()
 
 getSettings ()
 
 getSetting ($setting_name)
 
 filterEmptyItems ()
 
 getValue ($include_computed=FALSE)
 
 setValue ($values, $notify=TRUE)
 
 __get ($property_name)
 
 __set ($property_name, $value)
 
 __isset ($property_name)
 
 __unset ($property_name)
 
 access ($operation= 'view', AccountInterface $account=NULL, $return_as_object=FALSE)
 
 defaultAccess ($operation= 'view', AccountInterface $account=NULL)
 
 applyDefaultValue ($notify=TRUE)
 
 preSave ()
 
 postSave ($update)
 
 delete ()
 
 deleteRevision ()
 
 view ($display_options=array())
 
 generateSampleItems ($count=1)
 
 getConstraints ()
 
 defaultValuesForm (array &$form, FormStateInterface $form_state)
 
 defaultValuesFormValidate (array $element, array &$form, FormStateInterface $form_state)
 
 defaultValuesFormSubmit (array $element, array &$form, FormStateInterface $form_state)
 
 equals (FieldItemListInterface $list_to_compare)
 
- Public Member Functions inherited from ItemList
 getValue ()
 
 setValue ($values, $notify=TRUE)
 
 getString ()
 
 get ($index)
 
 set ($index, $value)
 
 removeItem ($index)
 
 first ()
 
 offsetExists ($offset)
 
 offsetUnset ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 appendItem ($value=NULL)
 
 getItemDefinition ()
 
 getIterator ()
 
 count ()
 
 isEmpty ()
 
 filter ($callback)
 
 onChange ($delta)
 
 __clone ()
 
- Public Member Functions inherited from TypedData
 __construct ($definition, $name=NULL, TypedDataInterface $parent=NULL)
 
 getPluginId ()
 
 getPluginDefinition ()
 
 getDataDefinition ()
 
 getValue ()
 
 setValue ($value, $notify=TRUE)
 
 getString ()
 
 getConstraints ()
 
 validate ()
 
 applyDefaultValue ($notify=TRUE)
 
 setContext ($name=NULL, TraversableTypedDataInterface $parent=NULL)
 
 getName ()
 
 getRoot ()
 
 getPropertyPath ()
 
 getParent ()
 

Static Public Member Functions

static processDefaultValue ($default_value, FieldableEntityInterface $entity, FieldDefinitionInterface $definition)
 
- Static Public Member Functions inherited from FieldItemList
static processDefaultValue ($default_value, FieldableEntityInterface $entity, FieldDefinitionInterface $definition)
 
- Static Public Member Functions inherited from TypedData
static createInstance ($definition, $name=NULL, TraversableTypedDataInterface $parent=NULL)
 

Additional Inherited Members

- Protected Member Functions inherited from FieldItemList
 createItem ($offset=0, $value=NULL)
 
 delegateMethod ($method)
 
 defaultValueWidget (FormStateInterface $form_state)
 
- Protected Member Functions inherited from ItemList
 rekey ($from_index=0)
 
 createItem ($offset=0, $value=NULL)
 
- Protected Attributes inherited from FieldItemList
 $list = array()
 
 $langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED
 
- Protected Attributes inherited from ItemList
 $list = array()
 
- Protected Attributes inherited from TypedData
 $definition
 
 $name
 
 $parent
 

Detailed Description

Defines a item list class for entity reference fields.

Member Function Documentation

defaultValuesFormSubmit ( array  $element,
array &  $form,
FormStateInterface  $form_state 
)

{Processes the submitted default value.Invoked from to allow administrators to configure instance-level default value.

Parameters
array$elementThe default value form element.
array$formThe form where the settings form is being included in.
\Drupal\Core\Form\FormStateInterface$form_stateThe form state of the (entire) configuration form.
Returns
array The field default value.
}

Implements FieldItemListInterface.

References Drupal\entityManager(), and FieldItemList\getSetting().

Here is the call graph for this function:

getConstraints ( )

{Gets a list of validation constraints.

Returns
array Array of constraints, each being an instance of .
}

Implements TypedDataInterface.

static processDefaultValue (   $default_value,
FieldableEntityInterface  $entity,
FieldDefinitionInterface  $definition 
)
static

{Processes the default value before being applied.Defined or configured default values of a field might need some processing in order to be a valid runtime value for the field type; e.g., a date field could process the defined value of 'NOW' to a valid date.

Parameters
arrayThe unprocessed default value defined for the field, as a numerically indexed array of items, each item being an array of property/value pairs.
\Drupal\Core\Entity\FieldableEntityInterface$entityThe entity for which the default value is generated.
\Drupal\Core\Field\FieldDefinitionInterface$definitionThe definition of the field.
Returns
array The return default value for the field.
}

Implements FieldItemListInterface.

References Drupal\entityManager(), Drupal\entityQuery(), DataDefinitionInterface\getSetting(), and EntityInterface\uuid().

Here is the call graph for this function:

referencedEntities ( )

{Gets the entities referenced by this field, preserving field item deltas.

Returns
[] An array of entity objects keyed by field item deltas.
}

Implements EntityReferenceFieldItemListInterface.

References Drupal\entityManager(), and FieldItemList\getFieldDefinition().

Here is the call graph for this function:


The documentation for this class was generated from the following file: