class ChangedFieldItemList

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/ChangedFieldItemList.php \Drupal\Core\Field\ChangedFieldItemList
  2. 8.9.x core/lib/Drupal/Core/Field/ChangedFieldItemList.php \Drupal\Core\Field\ChangedFieldItemList
  3. 10 core/lib/Drupal/Core/Field/ChangedFieldItemList.php \Drupal\Core\Field\ChangedFieldItemList

Defines an item list class for changed fields.

Hierarchy

Expanded class hierarchy of ChangedFieldItemList

2 files declare their use of ChangedFieldItemList
ChangedItem.php in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/ChangedItem.php
ChangedTestItem.php in core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ChangedTestItem.php

File

core/lib/Drupal/Core/Field/ChangedFieldItemList.php, line 11

Namespace

Drupal\Core\Field
View source
class ChangedFieldItemList extends FieldItemList {
    
    /**
     * {@inheritdoc}
     */
    public function defaultAccess($operation = 'view', ?AccountInterface $account = NULL) {
        // It is not possible to edit the changed field.
        return AccessResult::allowedIf($operation !== 'edit');
    }
    
    /**
     * {@inheritdoc}
     */
    public function hasAffectingChanges(FieldItemListInterface $original_items, $langcode) {
        // When saving entities in the user interface, the changed timestamp is
        // automatically incremented by ContentEntityForm::submitForm() even if
        // nothing was actually changed. Thus, the changed time needs to be
        // ignored when determining whether there are any actual changes in the
        // entity.
        return FALSE;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
ChangedFieldItemList::defaultAccess public function Overrides FieldItemList::defaultAccess
ChangedFieldItemList::hasAffectingChanges public function Overrides FieldItemList::hasAffectingChanges
DependencySerializationTrait::$_entityStorages protected property
DependencySerializationTrait::$_serviceIds protected property
DependencySerializationTrait::__sleep public function 1
DependencySerializationTrait::__wakeup public function 2
FieldItemList::$langcode protected property The langcode of the field values held in the object.
FieldItemList::$list protected property Numerically indexed array of field items. Overrides ItemList::$list 1
FieldItemList::access public function Overrides AccessibleInterface::access 1
FieldItemList::applyDefaultValue public function Overrides TypedData::applyDefaultValue
FieldItemList::createItem protected function Overrides ItemList::createItem
FieldItemList::defaultValuesForm public function Overrides FieldItemListInterface::defaultValuesForm 2
FieldItemList::defaultValuesFormSubmit public function Overrides FieldItemListInterface::defaultValuesFormSubmit 2
FieldItemList::defaultValuesFormValidate public function Overrides FieldItemListInterface::defaultValuesFormValidate 2
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 Overrides FieldItemListInterface::delete 2
FieldItemList::deleteRevision public function Overrides FieldItemListInterface::deleteRevision 1
FieldItemList::equals public function Overrides FieldItemListInterface::equals 2
FieldItemList::filterEmptyItems public function Overrides FieldItemListInterface::filterEmptyItems
FieldItemList::generateSampleItems public function Overrides FieldItemListInterface::generateSampleItems 1
FieldItemList::getConstraints public function Overrides TypedData::getConstraints 1
FieldItemList::getEntity public function Overrides FieldItemListInterface::getEntity 1
FieldItemList::getFieldDefinition public function Overrides FieldItemListInterface::getFieldDefinition
FieldItemList::getLangcode public function Overrides FieldItemListInterface::getLangcode
FieldItemList::getSetting public function Overrides FieldItemListInterface::getSetting
FieldItemList::getSettings public function Overrides FieldItemListInterface::getSettings
FieldItemList::postSave public function Overrides FieldItemListInterface::postSave 1
FieldItemList::preSave public function Overrides FieldItemListInterface::preSave 1
FieldItemList::processDefaultValue public static function Overrides FieldItemListInterface::processDefaultValue 2
FieldItemList::setLangcode public function Overrides FieldItemListInterface::setLangcode
FieldItemList::setValue public function Overrides ItemList::setValue
FieldItemList::view public function Overrides FieldItemListInterface::view
FieldItemList::__get public function Overrides FieldItemListInterface::__get
FieldItemList::__isset public function Overrides FieldItemListInterface::__isset
FieldItemList::__set public function Overrides FieldItemListInterface::__set
FieldItemList::__unset public function Overrides FieldItemListInterface::__unset
ItemList::appendItem public function Overrides ListInterface::appendItem
ItemList::count public function
ItemList::filter public function Overrides ListInterface::filter
ItemList::first public function Overrides ListInterface::first
ItemList::get public function Overrides ListInterface::get 2
ItemList::getItemDefinition public function Overrides ListInterface::getItemDefinition
ItemList::getIterator public function
ItemList::getString public function Overrides TypedData::getString
ItemList::getValue public function Overrides TypedData::getValue
ItemList::isEmpty public function Overrides ListInterface::isEmpty
ItemList::offsetExists public function 1
ItemList::offsetGet public function
ItemList::offsetSet public function
ItemList::offsetUnset public function
ItemList::onChange public function Overrides TraversableTypedDataInterface::onChange 1
ItemList::rekey protected function Renumbers the items in the list.
ItemList::removeItem public function Overrides ListInterface::removeItem
ItemList::set public function Overrides ListInterface::set
ItemList::__clone public function Magic method: Implements a deep clone.
StringTranslationTrait::$stringTranslation protected property The string translation service. 3
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. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
TypedData::$definition protected property The data definition. 1
TypedData::$name protected property The property name.
TypedData::$parent protected property The parent typed data object.
TypedData::createInstance public static function Overrides TypedDataInterface::createInstance
TypedData::getDataDefinition public function Overrides TypedDataInterface::getDataDefinition
TypedData::getName public function Overrides TypedDataInterface::getName
TypedData::getParent public function Overrides TypedDataInterface::getParent
TypedData::getPluginDefinition public function Overrides PluginInspectionInterface::getPluginDefinition
TypedData::getPluginId public function Overrides PluginInspectionInterface::getPluginId
TypedData::getPropertyPath public function Overrides TypedDataInterface::getPropertyPath
TypedData::getRoot public function Overrides TypedDataInterface::getRoot
TypedData::setContext public function Overrides TypedDataInterface::setContext
TypedData::validate public function Overrides TypedDataInterface::validate
TypedData::__construct public function Constructs a TypedData object given its definition and context. 4
TypedDataTrait::$typedDataManager protected property The typed data manager used for creating the data types.
TypedDataTrait::getTypedDataManager public function Gets the typed data manager. 2
TypedDataTrait::setTypedDataManager public function Sets the typed data manager. 2

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