class Test in Coder 8.3.x
Same name in this branch
- 8.3.x tests/DrupalPractice/Objects/UnusedPrivateMethodUnitTest.inc \Test
- 8.3.x tests/Drupal/Semantics/FunctionTUnitTest.inc \Test
- 8.3.x tests/Drupal/Commenting/DocCommentUnitTest.inc \Test
- 8.3.x tests/Drupal/Commenting/InlineCommentUnitTest.inc \Test
- 8.3.x tests/Drupal/Commenting/HookCommentUnitTest.inc \Test
- 8.3.x tests/Drupal/Commenting/DataTypeNamespaceUnitTest.inc \Foo\Bar\Test
- 8.3.x tests/Drupal/Commenting/FunctionCommentUnitTest.inc \Test
- 8.3.x tests/Drupal/Commenting/DocCommentAlignmentUnitTest.inc \Test
- 8.3.x tests/Drupal/Classes/PropertyDeclarationUnitTest.inc \Test
- 8.3.x tests/Drupal/NamingConventions/ValidFunctionNameUnitTest.inc \Test
Same name and namespace in other branches
- 8.3 tests/DrupalPractice/Objects/UnusedPrivateMethodUnitTest.inc \Test
- 8.3 tests/Drupal/Semantics/FunctionTUnitTest.inc \Test
- 8.3 tests/Drupal/Commenting/DocCommentUnitTest.inc \Test
- 8.3 tests/Drupal/Commenting/InlineCommentUnitTest.inc \Test
- 8.3 tests/Drupal/Commenting/HookCommentUnitTest.inc \Test
- 8.3 tests/Drupal/Commenting/FunctionCommentUnitTest.inc \Test
- 8.3 tests/Drupal/Commenting/DocCommentAlignmentUnitTest.inc \Test
- 8.3 tests/Drupal/Classes/PropertyDeclarationUnitTest.inc \Test
- 8.3 tests/Drupal/NamingConventions/ValidFunctionNameUnitTest.inc \Test
- 8.2 coder_sniffer/DrupalPractice/Test/Objects/UnusedPrivateMethodUnitTest.inc \Test
- 8.2 coder_sniffer/Drupal/Test/Semantics/FunctionTUnitTest.inc \Test
- 8.2 coder_sniffer/Drupal/Test/Commenting/InlineCommentUnitTest.inc \Test
- 8.2 coder_sniffer/Drupal/Test/Commenting/VariableCommentUnitTest.inc \Test
- 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \Test
- 8.2 coder_sniffer/Drupal/Test/Commenting/DocCommentAlignmentUnitTest.inc \Test
- 8.2 coder_sniffer/Drupal/Test/Classes/PropertyDeclarationUnitTest.inc \Test
- 8.2 coder_sniffer/Drupal/Test/NamingConventions/ValidFunctionNameUnitTest.inc \Test
Has a method doc comment that is not a hook implementation.
Hierarchy
- class \Test
Expanded class hierarchy of Test
1 file declares its use of Test
- UseGlobalClassUnitTest.inc in tests/
Drupal/ Classes/ UseGlobalClassUnitTest.inc - Example.
12 string references to 'Test'
- DefaultValueSanitizeUnitTest.inc in tests/
DrupalPractice/ FunctionCalls/ DefaultValueSanitizeUnitTest.inc - drupal8.info.yml in tests/
Drupal/ Classes/ drupal8/ drupal8.info.yml - tests/Drupal/Classes/drupal8/drupal8.info.yml
- drupal8.info.yml in tests/
Drupal/ good/ drupal8/ drupal8.info.yml - tests/Drupal/good/drupal8/drupal8.info.yml
- ExampleClass::test4 in tests/
DrupalPractice/ Objects/ drupal8/ ExampleClass.php - t() should not be used, instead we should use the StringTranslationTrait.
- ExampleClassWithDependencyInjection::test4 in tests/
DrupalPractice/ Objects/ drupal8/ ExampleClassWithDependencyInjection.php - t() should not be used, instead we should use the StringTranslationTrait.
File
- tests/
Drupal/ Commenting/ HookCommentUnitTest.inc, line 17 - Example file with hook implementations.
View source
class Test {
/**
* Implements a hook bridge for hook_entity_access().
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to check access for.
* @param string $operation
* The operation being performed.
* @param \Drupal\Core\Session\AccountInterface $account
* The user account making the to check access for.
*
* @return \Drupal\Core\Access\AccessResult
* The result of the access check.
*
* @see hook_entity_access()
*/
public function entityOperationAccess(EntityInterface $entity, $operation, AccountInterface $account) {
// Workspaces themselves are handled by their own access handler and we
// should not try to do any access checks for entity types that can not
// belong to a workspace.
if ($entity
->getEntityTypeId() === 'workspace' || !$this->workspaceManager
->isEntityTypeSupported($entity
->getEntityType())) {
return AccessResult::neutral();
}
return $this
->bypassAccessResult($account);
}
/**
* Implements a hook bridge for hook_entity_access().
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to check access for.
* @param string $operation
* The operation being performed.
* @param \Drupal\Core\Session\AccountInterface $account
* The user account making the to check access for.
*
* @return \Drupal\Core\Access\AccessResult
* The result of the access check.
*
* @see hook_entity_access()
*/
function entityOperationAccess2(EntityInterface $entity, $operation, AccountInterface $account) {
// Workspaces themselves are handled by their own access handler and we
// should not try to do any access checks for entity types that can not
// belong to a workspace.
if ($entity
->getEntityTypeId() === 'workspace' || !$this->workspaceManager
->isEntityTypeSupported($entity
->getEntityType())) {
return AccessResult::neutral();
}
return $this
->bypassAccessResult($account);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Test:: |
public | function | Implements a hook bridge for hook_entity_access(). | |
Test:: |
function | Implements a hook bridge for hook_entity_access(). |