class PluginHelper

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/PluginHelper.php \Drupal\Component\Plugin\PluginHelper
  2. 8.9.x core/lib/Drupal/Component/Plugin/PluginHelper.php \Drupal\Component\Plugin\PluginHelper
  3. 11.x core/lib/Drupal/Component/Plugin/PluginHelper.php \Drupal\Component\Plugin\PluginHelper

A helper class to determine if a plugin is configurable.

Hierarchy

Expanded class hierarchy of PluginHelper

Deprecated

in drupal:10.1.0 and is removed from drupal:11.0.0. Instead, use instanceof() to check for \Drupal\Component\Plugin\ConfigurableInterface.

See also

https://www.drupal.org/node/3198285

1 file declares its use of PluginHelper
PluginHelperLegacyTest.php in core/tests/Drupal/Tests/Component/Plugin/PluginHelperLegacyTest.php

File

core/lib/Drupal/Component/Plugin/PluginHelper.php, line 15

Namespace

Drupal\Component\Plugin
View source
class PluginHelper {
    
    /**
     * Determines if a plugin is configurable.
     *
     * @param mixed $plugin
     *   The plugin to check.
     *
     * @return bool
     *   A boolean indicating whether the plugin is configurable.
     */
    public static function isConfigurable($plugin) {
        return $plugin instanceof ConfigurableInterface;
    }

}

Members

Title Sort descending Modifiers Object type Summary
PluginHelper::isConfigurable public static function Determines if a plugin is configurable.

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