function ElementInfoTestHooks::elementPluginAlter

Implements hook_element_plugin_alter().

File

core/modules/system/tests/modules/element_info_test/src/Hook/ElementInfoTestHooks.php, line 28

Class

ElementInfoTestHooks
Hook implementations for element_info_test.

Namespace

Drupal\element_info_test\Hook

Code

public function elementPluginAlter(array &$definitions) {
    if (\Drupal::state()->get('hook_element_plugin_alter:remove_weight', FALSE)) {
        unset($definitions['weight']);
    }
}

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