Mercurial > hg > isophonics-drupal-site
comparison core/modules/editor/src/EditorAccessControlHandler.php @ 0:4c8ae668cc8c
Initial import (non-working)
| author | Chris Cannam |
|---|---|
| date | Wed, 29 Nov 2017 16:09:58 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4c8ae668cc8c |
|---|---|
| 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 } |
