ConfigTestAccessControlHandler.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\config_testFile
core/modules/config/tests/config_test/src/ConfigTestAccessControlHandler.phpView 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
Name | Description |
---|---|
ConfigTestAccessControlHandler | Defines the access control handler for the config_test entity type. |