class EntityCrudHookTestHooks

Hook implementations for entity_crud_hook_test.

Hierarchy

Expanded class hierarchy of EntityCrudHookTestHooks

File

core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php, line 13

Namespace

Drupal\entity_crud_hook_test\Hook
View source
class EntityCrudHookTestHooks {
    
    /**
     * Implements hook_entity_create().
     */
    public function entityCreate(EntityInterface $entity) {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_create' . ' called for type ' . $entity->getEntityTypeId();
    }
    
    /**
     * Implements hook_ENTITY_TYPE_create() for block entities.
     */
    public function blockCreate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_create' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_create() for comment entities.
     */
    public function commentCreate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_create' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_create() for file entities.
     */
    public function fileCreate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_create' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_create() for node entities.
     */
    public function nodeCreate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_create' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_create() for taxonomy_term entities.
     */
    public function taxonomyTermCreate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_create' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_create() for taxonomy_vocabulary entities.
     */
    public function taxonomyVocabularyCreate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_create' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_create() for user entities.
     */
    public function userCreate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_create' . ' called';
    }
    
    /**
     * Implements hook_entity_presave().
     */
    public function entityPresave(EntityInterface $entity) {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_presave' . ' called for type ' . $entity->getEntityTypeId();
    }
    
    /**
     * Implements hook_ENTITY_TYPE_presave() for block entities.
     */
    public function blockPresave() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_presave' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_presave() for comment entities.
     */
    public function commentPresave() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_presave' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_presave() for file entities.
     */
    public function filePresave() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_presave' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_presave() for node entities.
     */
    public function nodePresave() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_presave' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_presave() for taxonomy_term entities.
     */
    public function taxonomyTermPresave() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_presave' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities.
     */
    public function taxonomyVocabularyPresave() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_presave' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_presave() for user entities.
     */
    public function userPresave() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_presave' . ' called';
    }
    
    /**
     * Implements hook_entity_insert().
     */
    public function entityInsert(EntityInterface $entity) {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_insert' . ' called for type ' . $entity->getEntityTypeId();
    }
    
    /**
     * Implements hook_ENTITY_TYPE_insert() for block entities.
     */
    public function blockInsert() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_insert' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_insert() for comment entities.
     */
    public function commentInsert() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_insert' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_insert() for file entities.
     */
    public function fileInsert() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_insert' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_insert() for node entities.
     */
    public function nodeInsert() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_insert' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_insert() for taxonomy_term entities.
     */
    public function taxonomyTermInsert() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_insert' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_insert() for taxonomy_vocabulary entities.
     */
    public function taxonomyVocabularyInsert() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_insert' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_insert() for user entities.
     */
    public function userInsert() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_insert' . ' called';
    }
    
    /**
     * Implements hook_entity_preload().
     */
    public function entityPreload(array $entities, $type) {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_preload' . ' called for type ' . $type;
    }
    
    /**
     * Implements hook_entity_load().
     */
    public function entityLoad(array $entities, $type) {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_load' . ' called for type ' . $type;
    }
    
    /**
     * Implements hook_ENTITY_TYPE_load() for block entities.
     */
    public function blockLoad() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_load' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_load() for comment entities.
     */
    public function commentLoad() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_load' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_load() for file entities.
     */
    public function fileLoad() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_load' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_load() for node entities.
     */
    public function nodeLoad() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_load' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_load() for taxonomy_term entities.
     */
    public function taxonomyTermLoad() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_load' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_load() for taxonomy_vocabulary entities.
     */
    public function taxonomyVocabularyLoad() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_load' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_load() for user entities.
     */
    public function userLoad() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_load' . ' called';
    }
    
    /**
     * Implements hook_entity_update().
     */
    public function entityUpdate(EntityInterface $entity) {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_update' . ' called for type ' . $entity->getEntityTypeId();
    }
    
    /**
     * Implements hook_ENTITY_TYPE_update() for block entities.
     */
    public function blockUpdate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_update' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_update() for comment entities.
     */
    public function commentUpdate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_update' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_update() for file entities.
     */
    public function fileUpdate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_update' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_update() for node entities.
     */
    public function nodeUpdate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_update' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_update() for taxonomy_term entities.
     */
    public function taxonomyTermUpdate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_update' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_update() for taxonomy_vocabulary entities.
     */
    public function taxonomyVocabularyUpdate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_update' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_update() for user entities.
     */
    public function userUpdate() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_update' . ' called';
    }
    
    /**
     * Implements hook_entity_predelete().
     */
    public function entityPredelete(EntityInterface $entity) {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_predelete' . ' called for type ' . $entity->getEntityTypeId();
    }
    
    /**
     * Implements hook_ENTITY_TYPE_predelete() for block entities.
     */
    public function blockPredelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_predelete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_predelete() for comment entities.
     */
    public function commentPredelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_predelete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_predelete() for file entities.
     */
    public function filePredelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_predelete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_predelete() for node entities.
     */
    public function nodePredelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_predelete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_predelete() for taxonomy_term entities.
     */
    public function taxonomyTermPredelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_predelete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_predelete() for taxonomy_vocabulary entities.
     */
    public function taxonomyVocabularyPredelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_predelete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_predelete() for user entities.
     */
    public function userPredelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_predelete' . ' called';
    }
    
    /**
     * Implements hook_entity_delete().
     */
    public function entityDelete(EntityInterface $entity) {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_entity_delete' . ' called for type ' . $entity->getEntityTypeId();
    }
    
    /**
     * Implements hook_ENTITY_TYPE_delete() for block entities.
     */
    public function blockDelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_block_delete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_delete() for comment entities.
     */
    public function commentDelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_comment_delete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_delete() for file entities.
     */
    public function fileDelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_file_delete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_delete() for node entities.
     */
    public function nodeDelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_node_delete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities.
     */
    public function taxonomyTermDelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_term_delete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_delete() for taxonomy_vocabulary entities.
     */
    public function taxonomyVocabularyDelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_taxonomy_vocabulary_delete' . ' called';
    }
    
    /**
     * Implements hook_ENTITY_TYPE_delete() for user entities.
     */
    public function userDelete() {
        $GLOBALS['entity_crud_hook_test'][] = 'entity_crud_hook_test_user_delete' . ' called';
    }

}

Members

Title Sort descending Modifiers Object type Summary
EntityCrudHookTestHooks::blockCreate public function Implements hook_ENTITY_TYPE_create() for block entities.
EntityCrudHookTestHooks::blockDelete public function Implements hook_ENTITY_TYPE_delete() for block entities.
EntityCrudHookTestHooks::blockInsert public function Implements hook_ENTITY_TYPE_insert() for block entities.
EntityCrudHookTestHooks::blockLoad public function Implements hook_ENTITY_TYPE_load() for block entities.
EntityCrudHookTestHooks::blockPredelete public function Implements hook_ENTITY_TYPE_predelete() for block entities.
EntityCrudHookTestHooks::blockPresave public function Implements hook_ENTITY_TYPE_presave() for block entities.
EntityCrudHookTestHooks::blockUpdate public function Implements hook_ENTITY_TYPE_update() for block entities.
EntityCrudHookTestHooks::commentCreate public function Implements hook_ENTITY_TYPE_create() for comment entities.
EntityCrudHookTestHooks::commentDelete public function Implements hook_ENTITY_TYPE_delete() for comment entities.
EntityCrudHookTestHooks::commentInsert public function Implements hook_ENTITY_TYPE_insert() for comment entities.
EntityCrudHookTestHooks::commentLoad public function Implements hook_ENTITY_TYPE_load() for comment entities.
EntityCrudHookTestHooks::commentPredelete public function Implements hook_ENTITY_TYPE_predelete() for comment entities.
EntityCrudHookTestHooks::commentPresave public function Implements hook_ENTITY_TYPE_presave() for comment entities.
EntityCrudHookTestHooks::commentUpdate public function Implements hook_ENTITY_TYPE_update() for comment entities.
EntityCrudHookTestHooks::entityCreate public function Implements hook_entity_create().
EntityCrudHookTestHooks::entityDelete public function Implements hook_entity_delete().
EntityCrudHookTestHooks::entityInsert public function Implements hook_entity_insert().
EntityCrudHookTestHooks::entityLoad public function Implements hook_entity_load().
EntityCrudHookTestHooks::entityPredelete public function Implements hook_entity_predelete().
EntityCrudHookTestHooks::entityPreload public function Implements hook_entity_preload().
EntityCrudHookTestHooks::entityPresave public function Implements hook_entity_presave().
EntityCrudHookTestHooks::entityUpdate public function Implements hook_entity_update().
EntityCrudHookTestHooks::fileCreate public function Implements hook_ENTITY_TYPE_create() for file entities.
EntityCrudHookTestHooks::fileDelete public function Implements hook_ENTITY_TYPE_delete() for file entities.
EntityCrudHookTestHooks::fileInsert public function Implements hook_ENTITY_TYPE_insert() for file entities.
EntityCrudHookTestHooks::fileLoad public function Implements hook_ENTITY_TYPE_load() for file entities.
EntityCrudHookTestHooks::filePredelete public function Implements hook_ENTITY_TYPE_predelete() for file entities.
EntityCrudHookTestHooks::filePresave public function Implements hook_ENTITY_TYPE_presave() for file entities.
EntityCrudHookTestHooks::fileUpdate public function Implements hook_ENTITY_TYPE_update() for file entities.
EntityCrudHookTestHooks::nodeCreate public function Implements hook_ENTITY_TYPE_create() for node entities.
EntityCrudHookTestHooks::nodeDelete public function Implements hook_ENTITY_TYPE_delete() for node entities.
EntityCrudHookTestHooks::nodeInsert public function Implements hook_ENTITY_TYPE_insert() for node entities.
EntityCrudHookTestHooks::nodeLoad public function Implements hook_ENTITY_TYPE_load() for node entities.
EntityCrudHookTestHooks::nodePredelete public function Implements hook_ENTITY_TYPE_predelete() for node entities.
EntityCrudHookTestHooks::nodePresave public function Implements hook_ENTITY_TYPE_presave() for node entities.
EntityCrudHookTestHooks::nodeUpdate public function Implements hook_ENTITY_TYPE_update() for node entities.
EntityCrudHookTestHooks::taxonomyTermCreate public function Implements hook_ENTITY_TYPE_create() for taxonomy_term entities.
EntityCrudHookTestHooks::taxonomyTermDelete public function Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities.
EntityCrudHookTestHooks::taxonomyTermInsert public function Implements hook_ENTITY_TYPE_insert() for taxonomy_term entities.
EntityCrudHookTestHooks::taxonomyTermLoad public function Implements hook_ENTITY_TYPE_load() for taxonomy_term entities.
EntityCrudHookTestHooks::taxonomyTermPredelete public function Implements hook_ENTITY_TYPE_predelete() for taxonomy_term entities.
EntityCrudHookTestHooks::taxonomyTermPresave public function Implements hook_ENTITY_TYPE_presave() for taxonomy_term entities.
EntityCrudHookTestHooks::taxonomyTermUpdate public function Implements hook_ENTITY_TYPE_update() for taxonomy_term entities.
EntityCrudHookTestHooks::taxonomyVocabularyCreate public function Implements hook_ENTITY_TYPE_create() for taxonomy_vocabulary entities.
EntityCrudHookTestHooks::taxonomyVocabularyDelete public function Implements hook_ENTITY_TYPE_delete() for taxonomy_vocabulary entities.
EntityCrudHookTestHooks::taxonomyVocabularyInsert public function Implements hook_ENTITY_TYPE_insert() for taxonomy_vocabulary entities.
EntityCrudHookTestHooks::taxonomyVocabularyLoad public function Implements hook_ENTITY_TYPE_load() for taxonomy_vocabulary entities.
EntityCrudHookTestHooks::taxonomyVocabularyPredelete public function Implements hook_ENTITY_TYPE_predelete() for taxonomy_vocabulary entities.
EntityCrudHookTestHooks::taxonomyVocabularyPresave public function Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities.
EntityCrudHookTestHooks::taxonomyVocabularyUpdate public function Implements hook_ENTITY_TYPE_update() for taxonomy_vocabulary entities.
EntityCrudHookTestHooks::userCreate public function Implements hook_ENTITY_TYPE_create() for user entities.
EntityCrudHookTestHooks::userDelete public function Implements hook_ENTITY_TYPE_delete() for user entities.
EntityCrudHookTestHooks::userInsert public function Implements hook_ENTITY_TYPE_insert() for user entities.
EntityCrudHookTestHooks::userLoad public function Implements hook_ENTITY_TYPE_load() for user entities.
EntityCrudHookTestHooks::userPredelete public function Implements hook_ENTITY_TYPE_predelete() for user entities.
EntityCrudHookTestHooks::userPresave public function Implements hook_ENTITY_TYPE_presave() for user entities.
EntityCrudHookTestHooks::userUpdate public function Implements hook_ENTITY_TYPE_update() for user entities.

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