ConfigTestAccessControlHandler.php

Same filename in other branches
  1. 8.9.x core/modules/config/tests/config_test/src/ConfigTestAccessControlHandler.php
  2. 10 core/modules/config/tests/config_test/src/ConfigTestAccessControlHandler.php
  3. 11.x core/modules/config/tests/config_test/src/ConfigTestAccessControlHandler.php

Namespace

Drupal\config_test

File

core/modules/config/tests/config_test/src/ConfigTestAccessControlHandler.php

View source
<?php

namespace Drupal\config_test;

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;

/**
 * Defines the access control handler for the config_test entity type.
 *
 * @see \Drupal\config_test\Entity\ConfigTest
 */
class ConfigTestAccessControlHandler extends EntityAccessControlHandler {
    
    /**
     * {@inheritdoc}
     */
    public function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
        return AccessResult::allowed();
    }
    
    /**
     * {@inheritdoc}
     */
    protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
        return AccessResult::allowed();
    }

}

Classes

Title Deprecated Summary
ConfigTestAccessControlHandler Defines the access control handler for the config_test entity type.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.