Drupal 8  8.0.2
FormModeAccessCheck Class Reference
Inheritance diagram for FormModeAccessCheck:

Public Member Functions

 __construct (EntityManagerInterface $entity_manager)
 access (Route $route, RouteMatchInterface $route_match, AccountInterface $account, $form_mode_name= 'default', $bundle=NULL)

Protected Attributes


Detailed Description

Defines an access check for entity form mode routes.

See Also

Constructor & Destructor Documentation

__construct ( EntityManagerInterface  $entity_manager)

Creates a new FormModeAccessCheck.

\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.

References Drupal\entityManager().

Here is the call graph for this function:

Member Function Documentation

access ( Route  $route,
RouteMatchInterface  $route_match,
AccountInterface  $account,
  $form_mode_name = 'default',
  $bundle = NULL 

Checks access to the form mode.

\Symfony\Component\Routing\Route$routeThe route to check against.
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe parametrized route.
\Drupal\Core\Session\AccountInterface$accountThe currently logged in account.
string$form_mode_name(optional) The form mode. Defaults to 'default'.
string$bundle(optional) The bundle. Different entity types can have different names for their bundle key, so if not specified on the route via a {bundle} parameter, the access checker determines the appropriate key name, and gets the value from the corresponding request attribute. For example, for nodes, the bundle key is "node_type", so the value would be available via the {node_type} parameter rather than a {bundle} parameter.
The access result.

References AccessResult\allowedIfHasPermission(), Drupal\entityManager(), RouteMatchInterface\getRawParameter(), and AccessResult\neutral().

Here is the call graph for this function:

The documentation for this class was generated from the following file: