comparison core/modules/editor/src/EditorAccessControlHandler.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 namespace Drupal\editor;
4
5 use Drupal\Core\Entity\EntityAccessControlHandler;
6 use Drupal\Core\Entity\EntityInterface;
7 use Drupal\Core\Session\AccountInterface;
8
9 /**
10 * Defines the access control handler for the text editor entity type.
11 *
12 * @see \Drupal\editor\Entity\Editor
13 */
14 class EditorAccessControlHandler extends EntityAccessControlHandler {
15
16 /**
17 * {@inheritdoc}
18 */
19 protected function checkAccess(EntityInterface $editor, $operation, AccountInterface $account) {
20 /** @var \Drupal\editor\EditorInterface $editor */
21 return $editor->getFilterFormat()->access($operation, $account, TRUE);
22 }
23
24 }