You are here

public function Menu::disallowedOptions in Workbench Access 8

Gets any options that are set but cannot be changed by the editor.

These options are typically passed as hidden form values so that an editor does not remove sections that they cannot access. See submitEntity() below for the implementation.

Parameters

string $field: The field element from a node form, after running through alterOptions().

Return value

array An array of section ids to remove from a form or list.

Overrides AccessControlHierarchyBase::disallowedOptions

File

src/Plugin/AccessControlHierarchy/Menu.php, line 198

Class

Menu
Defines a hierarchy based on a Menu.

Namespace

Drupal\workbench_access\Plugin\AccessControlHierarchy

Code

public function disallowedOptions($field) {

  // On the menu form, we never remove an existing parent item, so there is
  // no concept of a disallowed option.
  return [];
}