class ChangedFieldItemList
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Field/ChangedFieldItemList.php \Drupal\Core\Field\ChangedFieldItemList
- 10 core/lib/Drupal/Core/Field/ChangedFieldItemList.php \Drupal\Core\Field\ChangedFieldItemList
- 8.9.x core/lib/Drupal/Core/Field/ChangedFieldItemList.php \Drupal\Core\Field\ChangedFieldItemList
Defines an item list class for changed fields.
Hierarchy
- class \Drupal\Core\TypedData\TypedData implements \Drupal\Core\TypedData\TypedDataInterface, \Drupal\Component\Plugin\PluginInspectionInterface uses \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\TypedData\TypedDataTrait
- class \Drupal\Core\TypedData\Plugin\DataType\ItemList implements \Drupal\Core\TypedData\Plugin\DataType\IteratorAggregate, \Drupal\Core\TypedData\ListInterface extends \Drupal\Core\TypedData\TypedData
- class \Drupal\Core\Field\FieldItemList implements \Drupal\Core\Field\FieldItemListInterface extends \Drupal\Core\TypedData\Plugin\DataType\ItemList
- class \Drupal\Core\Field\ChangedFieldItemList extends \Drupal\Core\Field\FieldItemList
- class \Drupal\Core\Field\FieldItemList implements \Drupal\Core\Field\FieldItemListInterface extends \Drupal\Core\TypedData\Plugin\DataType\ItemList
- class \Drupal\Core\TypedData\Plugin\DataType\ItemList implements \Drupal\Core\TypedData\Plugin\DataType\IteratorAggregate, \Drupal\Core\TypedData\ListInterface extends \Drupal\Core\TypedData\TypedData
Expanded class hierarchy of ChangedFieldItemList
File
-
core/
lib/ Drupal/ Core/ Field/ ChangedFieldItemList.php, line 11
Namespace
Drupal\Core\FieldView 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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.