public function EntityReferenceBrowserTableWidget::getEditButtonAccess in Entity Browser - Table Layout 8
1 call to EntityReferenceBrowserTableWidget::getEditButtonAccess()
- EntityReferenceBrowserTableWidget::buildEditButton in src/
Plugin/ Field/ FieldWidget/ EntityReferenceBrowserTableWidget.php
File
- src/
Plugin/ Field/ FieldWidget/ EntityReferenceBrowserTableWidget.php, line 316
Class
- EntityReferenceBrowserTableWidget
- Plugin implementation of the 'entity_reference_browser_table_widget' widget.
Namespace
Drupal\entity_browser_table\Plugin\Field\FieldWidgetCode
public function getEditButtonAccess(EntityInterface $entity) {
$edit_button_access = $this
->getSetting('field_widget_edit') && $entity
->access('update', $this->currentUser);
if ($entity
->getEntityTypeId() == 'file') {
// On file entities, the "edit" button shouldn't be visible unless
// the module "file_entity" is present, which will allow them to be
// edited on their own form.
$edit_button_access &= $this->moduleHandler
->moduleExists('file_entity');
}
return $edit_button_access;
}