Version 1
[yaffs-website] / web / core / modules / editor / src / EditorAccessControlHandler.php
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 }