class ComputedTestBundleFieldItemList

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestBundleFieldItemList.php \Drupal\entity_test\Plugin\Field\ComputedTestBundleFieldItemList
  2. 10 core/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestBundleFieldItemList.php \Drupal\entity_test\Plugin\Field\ComputedTestBundleFieldItemList

A computed field item list for a bundle field.

Hierarchy

Expanded class hierarchy of ComputedTestBundleFieldItemList

1 file declares its use of ComputedTestBundleFieldItemList
EntityTestComputedBundleField.php in core/modules/system/tests/modules/entity_test/src/Entity/EntityTestComputedBundleField.php

File

core/modules/system/tests/modules/entity_test/src/Plugin/Field/ComputedTestBundleFieldItemList.php, line 13

Namespace

Drupal\entity_test\Plugin\Field
View source
class ComputedTestBundleFieldItemList extends FieldItemList {
  use ComputedItemListTrait;
  
  /**
   * Compute the list property from state.
   */
  protected function computeValue() {
    foreach (\Drupal::state()->get('entity_test_comp_bund_fld_item_list_value', []) as $delta => $item) {
      $this->list[$delta] = $this->createItem($delta, $item);
    }
  }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ComputedItemListTrait::$valueComputed protected property Whether the values have already been computed or not.
ComputedItemListTrait::appendItem public function
ComputedItemListTrait::applyDefaultValue public function
ComputedItemListTrait::count public function
ComputedItemListTrait::ensureComputedValue protected function Ensures that values are only computed once.
ComputedItemListTrait::get public function
ComputedItemListTrait::getIterator public function
ComputedItemListTrait::getString public function
ComputedItemListTrait::getValue public function
ComputedItemListTrait::isEmpty public function
ComputedItemListTrait::offsetExists public function
ComputedItemListTrait::removeItem public function
ComputedItemListTrait::set public function
ComputedItemListTrait::setValue public function
ComputedTestBundleFieldItemList::computeValue protected function Compute the list property from state. Overrides ComputedItemListTrait::computeValue
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function
DependencySerializationTrait::__wakeup public function
FieldItemList::$langcode protected property The langcode of the field values held in the object.
FieldItemList::$list protected property Numerically indexed array of field items.
FieldItemList::access public function
FieldItemList::createItem protected function
FieldItemList::defaultAccess public function
FieldItemList::defaultValuesForm public function
FieldItemList::defaultValuesFormSubmit public function
FieldItemList::defaultValuesFormValidate public function
FieldItemList::defaultValueWidget protected function Returns the widget object used in default value form.
FieldItemList::delegateMethod protected function Calls a method on each FieldItem.
FieldItemList::delete public function
FieldItemList::deleteRevision public function
FieldItemList::equals public function
FieldItemList::filterEmptyItems public function
FieldItemList::generateSampleItems public function
FieldItemList::getConstraints public function
FieldItemList::getEntity public function
FieldItemList::getFieldDefinition public function
FieldItemList::getLangcode public function
FieldItemList::getSetting public function
FieldItemList::getSettings public function
FieldItemList::hasAffectingChanges public function
FieldItemList::postSave public function
FieldItemList::preSave public function
FieldItemList::processDefaultValue public static function
FieldItemList::setLangcode public function
FieldItemList::view public function
FieldItemList::__get public function
FieldItemList::__isset public function
FieldItemList::__set public function
FieldItemList::__unset public function
ItemList::filter public function
ItemList::first public function
ItemList::getItemDefinition public function
ItemList::last public function
ItemList::offsetGet public function
ItemList::offsetSet public function
ItemList::offsetUnset public function
ItemList::onChange public function
ItemList::rekey protected function Renumbers the items in the list.
ItemList::__clone public function Magic method: Implements a deep clone.
StringTranslationTrait::$stringTranslation protected property The string translation service.
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use.
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
TypedData::$definition protected property The data definition.
TypedData::$name protected property The property name.
TypedData::$parent protected property The parent typed data object.
TypedData::createInstance public static function
TypedData::getDataDefinition public function
TypedData::getName public function
TypedData::getParent public function
TypedData::getPluginDefinition public function
TypedData::getPluginId public function
TypedData::getPropertyPath public function
TypedData::getRoot public function
TypedData::setContext public function
TypedData::validate public function
TypedData::__construct public function Constructs a TypedData object given its definition and context.
TypedDataTrait::$typedDataManager protected property The typed data manager used for creating the data types.
TypedDataTrait::getTypedDataManager public function Gets the typed data manager.
TypedDataTrait::setTypedDataManager public function Sets the typed data manager.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.