DeprecationTestHooks.php

Same filename and directory in other branches
  1. main core/modules/system/tests/modules/deprecation_test/src/Hook/DeprecationTestHooks.php

Namespace

Drupal\deprecation_test\Hook

File

core/modules/system/tests/modules/deprecation_test/src/Hook/DeprecationTestHooks.php

View source
<?php

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

use Drupal\Core\Hook\Attribute\Hook;

/**
 * Implements hooks for the deprecation test.
 */
class DeprecationTestHooks {
  
  /**
   * Implements hook_deprecated_hook().
   */
  public function deprecatedHook($arg) : mixed {
    return $arg;
  }
  
  /**
   * Implements hook_deprecated_alter_alter().
   */
  public function deprecatedAlterAlterFirst(&$data, $context1, $context2) : void {
    $data = [
      $context1,
      $context2,
    ];
  }

}

Classes

Title Deprecated Summary
DeprecationTestHooks Implements hooks for the deprecation test.

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