class MockUserLoginBlock

Same name in other branches
  1. 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
  2. 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
  3. 11.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

Mock implementation of a login block plugin used by Plugin API unit tests.

Hierarchy

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 12

Namespace

Drupal\plugin_test\Plugin\plugin_test\mock_block
View 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 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 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.