plugin_test.module

Same filename in other branches
  1. 9 core/modules/system/tests/modules/plugin_test/plugin_test.module
  2. 8.9.x core/modules/system/tests/modules/plugin_test/plugin_test.module
  3. 11.x core/modules/system/tests/modules/plugin_test/plugin_test.module

Helper module for the plugin tests.

File

core/modules/system/tests/modules/plugin_test/plugin_test.module

View source
<?php


/**
 * @file
 * Helper module for the plugin tests.
 */
use Drupal\plugin_test\Plugin\plugin_test\fruit\Apple;

/**
 * Implements hook_test_plugin_info().
 */
function plugin_test_test_plugin_info() {
    return [
        'apple' => [
            'id' => 'apple',
            'class' => Apple::class,
        ],
    ];
}

/**
 * Implements hook_plugin_test_alter().
 */
function plugin_test_plugin_test_alter(&$definitions) {
    foreach ($definitions as &$definition) {
        $definition['altered'] = TRUE;
    }
    $definitions['user_login']['altered_single'] = TRUE;
}

Functions

Title Deprecated Summary
plugin_test_plugin_test_alter Implements hook_plugin_test_alter().
plugin_test_test_plugin_info Implements hook_test_plugin_info().

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