class WorkflowDeleteAccessCheck
Provides a access checker for deleting a workflow state.
@internal Marked as internal for use by the workflows module only.
This is deprecated in drupal:8.6.0 and is removed from drupal:9.0.0. Use _workflow_access in route definitions instead.
# The old approach:
requirements:
_workflow_state_delete_access: 'true'
# The new approach:
requirements:
_workflow_access: 'delete-state'
As an internal API the ability to use _workflow_state_delete_access may also be removed in a minor release.
Hierarchy
- class \Drupal\workflows\WorkflowStateTransitionOperationsAccessCheck implements \Drupal\Core\Routing\Access\AccessInterface
- class \Drupal\workflows\WorkflowDeleteAccessCheck extends \Drupal\workflows\WorkflowStateTransitionOperationsAccessCheck
Expanded class hierarchy of WorkflowDeleteAccessCheck
See also
\Drupal\workflows\WorkflowStateTransitionOperationsAccessCheck
https://www.drupal.org/node/2929327
1 file declares its use of WorkflowDeleteAccessCheck
- WorkflowStateTransitionOperationsAccessCheckTest.php in core/
modules/ workflows/ tests/ src/ Unit/ WorkflowStateTransitionOperationsAccessCheckTest.php
1 string reference to 'WorkflowDeleteAccessCheck'
- workflows.services.yml in core/
modules/ workflows/ workflows.services.yml - core/modules/workflows/workflows.services.yml
1 service uses WorkflowDeleteAccessCheck
- workflows.access_check.delete_state in core/
modules/ workflows/ workflows.services.yml - \Drupal\workflows\WorkflowDeleteAccessCheck
File
-
core/
modules/ workflows/ src/ WorkflowDeleteAccessCheck.php, line 30
Namespace
Drupal\workflowsView source
class WorkflowDeleteAccessCheck extends WorkflowStateTransitionOperationsAccessCheck {
/**
* {@inheritdoc}
*/
public function access(RouteMatchInterface $route_match, AccountInterface $account) {
@trigger_error('Using the _workflow_state_delete_access check is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0, use _workflow_access instead. As an internal API _workflow_state_delete_access may also be removed in a minor release.', E_USER_DEPRECATED);
return parent::access($route_match, $account);
}
/**
* {@inheritdoc}
*/
protected function getOperation(RouteMatchInterface $route_match) {
return 'delete-state';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
WorkflowDeleteAccessCheck::access | public | function | Checks access for operations of workflow states and transitions. | Overrides WorkflowStateTransitionOperationsAccessCheck::access |
WorkflowDeleteAccessCheck::getOperation | protected | function | Get the operation that will be used for the access check | Overrides WorkflowStateTransitionOperationsAccessCheck::getOperation |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.