MockUserLoginBlock.php in Drupal 9
File
core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockUserLoginBlock.php
View source
<?php
namespace Drupal\plugin_test\Plugin\plugin_test\mock_block;
use Drupal\Component\Plugin\PluginBase;
class MockUserLoginBlock extends PluginBase {
protected $title;
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->title = isset($configuration['title']) ? $configuration['title'] : '';
}
public function getTitle() {
return $this->title;
}
}
Classes
Name |
Description |
MockUserLoginBlock |
Mock implementation of a login block plugin used by Plugin API unit tests. |