class MockUserLoginBlock
Same name in other branches
- 9 core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserLoginBlock.php \Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock
- 8.9.x core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserLoginBlock.php \Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock
- 10 core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserLoginBlock.php \Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock
Mock implementation of a login block plugin used by Plugin API unit tests.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock extends \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of MockUserLoginBlock
See also
\Drupal\plugin_test\Plugin\MockBlockManager
File
-
core/
modules/ system/ tests/ modules/ plugin_test/ src/ Plugin/ plugin_test/ mock_block/ MockUserLoginBlock.php, line 14
Namespace
Drupal\plugin_test\Plugin\plugin_test\mock_blockView source
class MockUserLoginBlock extends PluginBase {
/**
* The title to display when rendering this block instance.
*
* @var string
*/
protected $title;
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->title = $configuration['title'] ?? '';
}
public function getTitle() {
return $this->title;
}
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|---|
MockUserLoginBlock::$title | protected | property | The title to display when rendering this block instance. | ||
MockUserLoginBlock::getTitle | public | function | |||
MockUserLoginBlock::__construct | public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | Overrides PluginBase::__construct | |
PluginBase::$configuration | protected | property | Configuration information passed into the plugin. | ||
PluginBase::$pluginDefinition | protected | property | The plugin implementation definition. | ||
PluginBase::$pluginId | protected | property | The plugin ID. | ||
PluginBase::DERIVATIVE_SEPARATOR | constant | A string which is used to separate base plugin IDs from the derivative ID. | |||
PluginBase::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | Overrides DerivativeInspectionInterface::getBaseId | |
PluginBase::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | Overrides DerivativeInspectionInterface::getDerivativeId | |
PluginBase::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | Overrides PluginInspectionInterface::getPluginDefinition | |
PluginBase::getPluginId | public | function | Gets the plugin ID of the plugin instance. | Overrides PluginInspectionInterface::getPluginId | |
PluginBase::isConfigurable | Deprecated | public | function | Determines if the plugin is configurable. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.