class EntityTestExtraHooks

Hook implementations for entity_test_extra.

Hierarchy

Expanded class hierarchy of EntityTestExtraHooks

File

core/modules/system/tests/modules/entity_test_extra/src/Hook/EntityTestExtraHooks.php, line 13

Namespace

Drupal\entity_test_extra\Hook
View source
class EntityTestExtraHooks {
    
    /**
     * Implements hook_entity_base_field_info().
     */
    public function entityBaseFieldInfo(EntityTypeInterface $entity_type) {
        return \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []);
    }
    
    /**
     * Implements hook_entity_field_storage_info().
     */
    public function entityFieldStorageInfo(EntityTypeInterface $entity_type) {
        return \Drupal::state()->get($entity_type->id() . '.additional_field_storage_definitions', []);
    }
    
    /**
     * Implements hook_entity_bundle_field_info().
     */
    public function entityBundleFieldInfo(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) {
        return \Drupal::state()->get($entity_type->id() . '.' . $bundle . '.additional_bundle_field_definitions', []);
    }

}

Members

Title Sort descending Modifiers Object type Summary
EntityTestExtraHooks::entityBaseFieldInfo public function Implements hook_entity_base_field_info().
EntityTestExtraHooks::entityBundleFieldInfo public function Implements hook_entity_bundle_field_info().
EntityTestExtraHooks::entityFieldStorageInfo public function Implements hook_entity_field_storage_info().

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