class 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

drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/mock_block/MockUserLoginBlock.php, line 17
Definition of Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock.

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, array $plugin_definition) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->title = isset($configuration['title']) ? $configuration['title'] : '';
  }
  public function getTitle() {
    return $this->title;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
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. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition.
PluginBase::$pluginId protected property The plugin_id.
PluginBase::getPluginDefinition public function Returns the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition
PluginBase::getPluginId public function Returns the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId