MockUserLoginBlock.php
Namespace
Drupal\plugin_test\Plugin\plugin_test\mock_blockFile
- 
              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;
/**
 * Mock implementation of a login block plugin used by Plugin API unit tests.
 *
 * @see \Drupal\plugin_test\Plugin\MockBlockManager
 */
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;
  }
}Classes
| Title | Deprecated | Summary | 
|---|---|---|
| MockUserLoginBlock | Mock implementation of a login block plugin used by Plugin API unit tests. | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
