entity_test_extra.module
Same filename in other branches
File
-
core/
modules/ system/ tests/ modules/ entity_test_extra/ entity_test_extra.module
View source
<?php
/**
* @file
* Test module for the entity API providing several extra fields for testing.
*/
declare (strict_types=1);
use Drupal\Core\Entity\EntityTypeInterface;
/**
* Implements hook_entity_base_field_info().
*/
function entity_test_extra_entity_base_field_info(EntityTypeInterface $entity_type) {
return \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []);
}
/**
* Implements hook_entity_field_storage_info().
*/
function entity_test_extra_entity_field_storage_info(EntityTypeInterface $entity_type) {
return \Drupal::state()->get($entity_type->id() . '.additional_field_storage_definitions', []);
}
/**
* Implements hook_entity_bundle_field_info().
*/
function entity_test_extra_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) {
return \Drupal::state()->get($entity_type->id() . '.' . $bundle . '.additional_bundle_field_definitions', []);
}
Functions
Title | Deprecated | Summary |
---|---|---|
entity_test_extra_entity_base_field_info | Implements hook_entity_base_field_info(). | |
entity_test_extra_entity_bundle_field_info | Implements hook_entity_bundle_field_info(). | |
entity_test_extra_entity_field_storage_info | Implements hook_entity_field_storage_info(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.