ContextAccess.php in Context 8
Same filename and directory in other branches
Contains \Drupal\context\Entity\ContextAccess.
Namespace
Drupal\context\EntityFile
src/Entity/ContextAccess.phpView source
<?php
/**
* @file
* Contains \Drupal\context\Entity\ContextAccess.
*/
namespace Drupal\context\Entity;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityHandlerInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Defines the access control handler for the page entity type.
*/
class ContextAccess extends EntityAccessControlHandler implements EntityHandlerInterface {
/**
* Constructs an access control handler instance.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
*/
public function __construct(EntityTypeInterface $entity_type) {
parent::__construct($entity_type);
}
/**
* {@inheritdoc}
*/
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static($entity_type);
}
/**
* {@inheritdoc}
*/
protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
return parent::checkAccess($entity, $operation, $account);
}
}
Classes
Name | Description |
---|---|
ContextAccess | Defines the access control handler for the page entity type. |