Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 7 |
| ViewAccessControlHandler | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 7 |
| checkAccess | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 7 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\views\ViewAccessControlHandler. | |
| */ | |
| namespace Drupal\views; | |
| use Drupal\Core\Access\AccessResult; | |
| use Drupal\Core\Entity\EntityAccessControlHandler; | |
| use Drupal\Core\Entity\EntityInterface; | |
| use Drupal\Core\Session\AccountInterface; | |
| /** | |
| * Defines the access control handler for the view entity type. | |
| * | |
| * @see \Drupal\views\Entity\View | |
| */ | |
| class ViewAccessControlHandler extends EntityAccessControlHandler { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) { | |
| if ($operation == 'view') { | |
| return AccessResult::allowed(); | |
| } | |
| else { | |
| return parent::checkAccess($entity, $operation, $account); | |
| } | |
| } | |
| } |