function DevelHooks::pageAttachmentsAlter

Implements hook_page_attachments_alter().

Attributes

#[Hook('page_attachments_alter')]

File

src/Hook/DevelHooks.php, line 171

Class

DevelHooks
Hook implementations for devel.

Namespace

Drupal\devel\Hook

Code

public function pageAttachmentsAlter(array &$attachments) : void {
  if ($this->currentUser
    ->hasPermission('access devel information') && $this->configFactory
    ->get('devel.settings')
    ->get('page_alter')) {
    $this->dumper
      ->message(input: $attachments, name: 'attachments');
  }
}