Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

PageAttachmentsHook.php

Namespace

Drupal\system\Hook

File

core/modules/system/src/Hook/PageAttachmentsHook.php

View source
<?php

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

use Drupal\Core\Hook\Attribute\Hook;
use Drupal\Core\Render\BareHtmlPageRendererInterface;

/**
 * Implements hook_page_attachments() for the system module.
 */
final class PageAttachmentsHook {
    public function __construct(BareHtmlPageRendererInterface $bareHtmlPageRenderer) {
    }
    
    /**
     * Implements hook_page_attachments().
     *
     * @see template_preprocess_maintenance_page()
     * @see \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter
     */
    public function pageAttachments(array &$page) : void {
        $this->bareHtmlPageRenderer
            ->systemPageAttachments($page);
    }

}

Classes

Title Deprecated Summary
PageAttachmentsHook Implements hook_page_attachments() for the system module.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal