class TestContextAwarePlugin
Same name in this branch
- 10 core/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php \Drupal\KernelTests\Core\Plugin\TestContextAwarePlugin
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php \Drupal\KernelTests\Core\Plugin\TestContextAwarePlugin
- 9 core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php \Drupal\KernelTests\Core\Plugin\Context\TestContextAwarePlugin
- 8.9.x core/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php \Drupal\KernelTests\Core\Plugin\TestContextAwarePlugin
- 8.9.x core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php \Drupal\KernelTests\Core\Plugin\Context\TestContextAwarePlugin
- 11.x core/tests/Drupal/KernelTests/Core/Plugin/ContextHandlerTest.php \Drupal\KernelTests\Core\Plugin\TestContextAwarePlugin
- 11.x core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php \Drupal\KernelTests\Core\Plugin\Context\TestContextAwarePlugin
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
- class \Drupal\KernelTests\Core\Plugin\Context\TestContextAwarePlugin extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Plugin\ContextAwarePluginInterface uses \Drupal\Core\Plugin\ContextAwarePluginTrait
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
Expanded class hierarchy of TestContextAwarePlugin
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginTraitTest.php, line 104
Namespace
Drupal\KernelTests\Core\Plugin\ContextView source
class TestContextAwarePlugin extends PluginBase implements ContextAwarePluginInterface {
use ContextAwarePluginTrait {
setContext as setContextTrait;
}
/**
* Indicates if ::setContext() has been called or not.
*
* @var bool
*/
public $setContextCalled = FALSE;
/**
* {@inheritdoc}
*/
public function setContext($name, ComponentContextInterface $context) {
$this->setContextTrait($name, $context);
$this->setContextCalled = TRUE;
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.