}
}
-/**
- * Implements hook_entity_field_storage_info().
- */
-function entity_test_entity_field_storage_info(EntityTypeInterface $entity_type) {
- if ($entity_type->id() == 'entity_test_update') {
- return \Drupal::state()->get('entity_test_update.additional_field_storage_definitions', []);
- }
-}
-
/**
* Creates a new bundle for entity_test entities.
*
return AccessResult::allowed();
}
+ // Create specific labels to allow or deny access based on certain test
+ // conditions.
+ // @see \Drupal\KernelTests\Core\Entity\EntityAccessControlHandlerTest
+ if ($entity->label() == 'Accessible') {
+ return AccessResult::allowed();
+ }
+ if ($entity->label() == 'Inaccessible') {
+ return AccessResult::forbidden();
+ }
+
// Uncacheable because the access result depends on a State key-value pair and
// might therefore change at any time.
$condition = \Drupal::state()->get("entity_test_entity_access.{$operation}." . $entity->id(), FALSE);