Version 1
[yaffs-website] / web / core / modules / system / tests / modules / plugin_test / src / Plugin / plugin_test / mock_block / MockComplexContextBlock.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 complex context plugin used by Plugin API context tests.
9  *
10  * @see \Drupal\plugin_test\Plugin\MockBlockManager
11  */
12 class MockComplexContextBlock extends ContextAwarePluginBase {
13
14   public function getTitle() {
15     $user = $this->getContextValue('user');
16     $node = $this->getContextValue('node');
17     return $user->label() . ' -- ' . $node->label();
18   }
19
20 }