You are here

public function Menu::applies in Workbench Access 8

Check if this access scheme applies to the given entity.

Parameters

string $entity_type_id: Entity type ID.

string $bundle: Bundle ID.

Return value

bool TRUE if this access scheme applies to the entity.

Overrides AccessControlHierarchyInterface::applies

File

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

Class

Menu
Defines a hierarchy based on a Menu.

Namespace

Drupal\workbench_access\Plugin\AccessControlHierarchy

Code

public function applies($entity_type_id, $bundle) {
  return $entity_type_id === 'node' && in_array($bundle, $this->configuration['bundles']);
}