interface WorkbenchAccessManagerInterface in Workbench Access 8
Defines an interface handling Workbench Access configuration.
Hierarchy
- interface \Drupal\Component\Plugin\Discovery\DiscoveryInterface; interface \Drupal\Component\Plugin\Factory\FactoryInterface; interface \Drupal\Component\Plugin\Mapper\MapperInterface
- interface \Drupal\Component\Plugin\PluginManagerInterface
- interface \Drupal\workbench_access\WorkbenchAccessManagerInterface
- interface \Drupal\Component\Plugin\PluginManagerInterface
Expanded class hierarchy of WorkbenchAccessManagerInterface
All classes that implement WorkbenchAccessManagerInterface
20 files declare their use of WorkbenchAccessManagerInterface
- AccessCacheTest.php in tests/
src/ Functional/ AccessCacheTest.php - AccessSchemeAddForm.php in src/
Form/ AccessSchemeAddForm.php - AssignUserForm.php in src/
Form/ AssignUserForm.php - EntityTestAccessTest.php in tests/
src/ Kernel/ EntityTestAccessTest.php - FilterAccessTest.php in tests/
src/ Kernel/ FilterAccessTest.php
File
- src/
WorkbenchAccessManagerInterface.php, line 12
Namespace
Drupal\workbench_accessView source
interface WorkbenchAccessManagerInterface extends PluginManagerInterface {
// @TODO: Remove.
const FIELD_NAME = 'field_workbench_access';
/**
* Checks that an entity belongs to a user section or its children.
*
* @param \Drupal\workbench_access\Entity\AccessSchemeInterface $scheme
* Access scheme.
* @param array $entity_sections
* The section assignments for the entity. An array of section ids.
* @param array $user_sections
* The section assignments for the user. An array of section ids.
*
* return boolean.
*/
public static function checkTree(AccessSchemeInterface $scheme, array $entity_sections, array $user_sections);
/**
* Returns a flat array of all active section ids.
*
* Used to display assignments for admins.
*
* @param \Drupal\workbench_access\Entity\AccessSchemeInterface $scheme
* Access scheme.
* @param bool $root_only
* If TRUE, only show the root-level assignments.
*
* @return array
* All sections for given scheme.
*/
public static function getAllSections(AccessSchemeInterface $scheme, $root_only = FALSE);
/**
* Determines if a user is assigned to all sections.
*
* This method checks the permissions and assignments for a user. Someone set
* as an admin or with access to the top-level sections is assumed to be able
* to access all sections. We use this logic in query filtering.
*
* @param \Drupal\workbench_access\Entity\AccessSchemeInterface $scheme
* Access scheme.
* @param \Drupal\Core\Session\AccountInterface $account
* Account being checked.
*
* @return bool
* TRUE if user is in all schemes.
*/
public function userInAll(AccessSchemeInterface $scheme, AccountInterface $account = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DiscoveryInterface:: |
public | function | Gets a specific plugin definition. | 4 |
DiscoveryInterface:: |
public | function | Gets the definition of all plugins for this type. | 3 |
DiscoveryInterface:: |
public | function | Indicates if a specific plugin definition exists. | 2 |
FactoryInterface:: |
public | function | Creates a pre-configured instance of a plugin. | 7 |
MapperInterface:: |
public | function | Gets a preconfigured instance of a plugin. | 4 |
WorkbenchAccessManagerInterface:: |
public static | function | Checks that an entity belongs to a user section or its children. | 1 |
WorkbenchAccessManagerInterface:: |
constant | |||
WorkbenchAccessManagerInterface:: |
public static | function | Returns a flat array of all active section ids. | 1 |
WorkbenchAccessManagerInterface:: |
public | function | Determines if a user is assigned to all sections. | 1 |