OnBehalfOfOtherModuleHook.php

Namespace

Drupal\hook_collector_on_behalf\Hook

File

core/modules/system/tests/modules/hook_collector_on_behalf/src/Hook/OnBehalfOfOtherModuleHook.php

View source
<?php

declare (strict_types=1);
namespace Drupal\hook_collector_on_behalf\Hook;

use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementation on behalf of another module.
 */
class OnBehalfOfOtherModuleHook {
    
    /**
     * Implements hook_module_preinstall().
     */
    public function flush() : void {
        // Set a global value we can check in test code.
        $GLOBALS['on_behalf_oop'] = 'on_behalf_oop';
    }

}

Classes

Title Deprecated Summary
OnBehalfOfOtherModuleHook Hook implementation on behalf of another module.

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