public static function getComponentsUsingHook(string $hookId): array
    {
        $componentsUsingHook = array();
        
        $components = self::getComponents();
        foreach ($components as $component) {
            if (!$component->hasHookWithId($hookId)) {
                continue;
            }
            
            $componentsUsingHook[] = $component;
        }
        
        return $componentsUsingHook;
    }
public static function getComponentsUsingHook(string $hookId): array
    {
        $componentsUsingHook = array();
        
        $components = self::getComponents();
        foreach ($components as $component) {
            if (!$component->hasHookWithId($hookId)) {
                continue;
            }
            
            $componentsUsingHook[] = $component;
        }
        
        return $componentsUsingHook;
    }
public static function getComponentsUsingHook ( string $ hookId ) : array { $ componentsUsingHook = array ( ) ; $ components = self :: getComponents ( ) ; foreach ( $ components as $ component ) { if ( ! $ component -> hasHookWithId ( $ hookId ) ) { continue ; } $ componentsUsingHook [ ] = $ component ; } return $ componentsUsingHook ; }
Get all components that are configured to be called when invoking a hook.

@param string $hookId
Identifier for the hook to call.

@return Component[] All components that are configured to be called when invoking a hook.
Get all components that are configured to be called when invoking a hook .