You are here

public function AjaxToggleForm::fieldIsEditable in Toggle Editable fields 8

Check if the combo of entity + field access are satisfased.

Return value

bool True if current user can edit the entity AND have access to current field.

2 calls to AjaxToggleForm::fieldIsEditable()
AjaxToggleForm::buildForm in src/Form/AjaxToggleForm.php
Form constructor.
AjaxToggleForm::updateFieldValue in src/Form/AjaxToggleForm.php
Update the clicked field with given value.

File

src/Form/AjaxToggleForm.php, line 198

Class

AjaxToggleForm
Build a form to switch state of targeted FieldItem.

Namespace

Drupal\toggle_editable_fields\Form

Code

public function fieldIsEditable() {
  return $this->entity
    ->access('update') && $this
    ->checkEditFieldAccess();
}