f781dc93b0dba0a059e81e025c0616916fb1cd41
[yaffs-website] / web / core / lib / Drupal / Core / Field / ChangedFieldItemList.php
1 <?php
2
3 namespace Drupal\Core\Field;
4
5 use Drupal\Core\Access\AccessResult;
6 use Drupal\Core\Session\AccountInterface;
7
8 /**
9  * Defines a item list class for changed fields.
10  */
11 class ChangedFieldItemList extends FieldItemList {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function defaultAccess($operation = 'view', AccountInterface $account = NULL) {
17     // It is not possible to edit the changed field.
18     return AccessResult::allowedIf($operation !== 'edit');
19   }
20
21 }