Version 1
[yaffs-website] / web / core / modules / system / tests / modules / plugin_test / src / Plugin / plugin_test / mock_block / MockUserNameBlock.php
1 <?php
2
3 namespace Drupal\plugin_test\Plugin\plugin_test\mock_block;
4
5 use Drupal\Core\Plugin\ContextAwarePluginBase;
6
7 /**
8  * Implementation of a user name block plugin used by Plugin API context test.
9  *
10  * @see \Drupal\plugin_test\Plugin\MockBlockManager
11  */
12 class MockUserNameBlock extends ContextAwarePluginBase {
13
14   public function getTitle() {
15     $user = $this->getContextValue('user');
16     return $user->label();
17   }
18
19 }