Version 1
[yaffs-website] / web / core / modules / system / tests / modules / plugin_test / src / Plugin / plugin_test / mock_block / MockUserLoginBlock.php
1 <?php
2
3 namespace Drupal\plugin_test\Plugin\plugin_test\mock_block;
4
5 use Drupal\Component\Plugin\PluginBase;
6
7 /**
8  * Mock implementation of a login block plugin used by Plugin API unit tests.
9  *
10  * @see \Drupal\plugin_test\Plugin\MockBlockManager
11  */
12 class MockUserLoginBlock extends PluginBase {
13
14   /**
15    * The title to display when rendering this block instance.
16    *
17    * @var string
18    */
19   protected $title;
20
21   public function __construct(array $configuration, $plugin_id, $plugin_definition) {
22     parent::__construct($configuration, $plugin_id, $plugin_definition);
23     $this->title = isset($configuration['title']) ? $configuration['title'] : '';
24   }
25
26   public function getTitle() {
27     return $this->title;
28   }
29
30 }