function PathFieldItemList::defaultAccess
Same name in other branches
- 9 core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php \Drupal\path\Plugin\Field\FieldType\PathFieldItemList::defaultAccess()
- 10 core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php \Drupal\path\Plugin\Field\FieldType\PathFieldItemList::defaultAccess()
- 11.x core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php \Drupal\path\Plugin\Field\FieldType\PathFieldItemList::defaultAccess()
Overrides FieldItemList::defaultAccess
File
-
core/
modules/ path/ src/ Plugin/ Field/ FieldType/ PathFieldItemList.php, line 47
Class
- PathFieldItemList
- Represents a configurable entity path field.
Namespace
Drupal\path\Plugin\Field\FieldTypeCode
public function defaultAccess($operation = 'view', AccountInterface $account = NULL) {
if ($operation == 'view') {
return AccessResult::allowed();
}
return AccessResult::allowedIfHasPermissions($account, [
'create url aliases',
'administer url aliases',
], 'OR')->cachePerPermissions();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.