VoteResultAccessControlHandler.php in Voting API 8.3
Namespace
Drupal\votingapiFile
src/VoteResultAccessControlHandler.phpView source
<?php
namespace Drupal\votingapi;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Session\AccountInterface;
/**
* Defines the access control handler for the vote entity type.
*
* @see \Drupal\votingapi\Entity\Vote
*/
class VoteResultAccessControlHandler extends EntityAccessControlHandler {
/**
* {@inheritdoc}
*/
protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
return AccessResult::allowed();
}
/**
* {@inheritdoc}
*/
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
return AccessResult::allowed();
}
/**
* {@inheritdoc}
*/
protected function checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) {
return AccessResult::allowed();
}
}
Classes
Name | Description |
---|---|
VoteResultAccessControlHandler | Defines the access control handler for the vote entity type. |