class TestViewsLocalTask in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php \Drupal\Tests\views\Unit\Plugin\Derivative\TestViewsLocalTask
- 9 core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php \Drupal\Tests\views\Unit\Plugin\Derivative\TestViewsLocalTask
Replaces the applicable views call for easier testability.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\views\Plugin\Derivative\ViewsLocalTask implements ContainerDeriverInterface
- class \Drupal\Tests\views\Unit\Plugin\Derivative\TestViewsLocalTask
- class \Drupal\views\Plugin\Derivative\ViewsLocalTask implements ContainerDeriverInterface
Expanded class hierarchy of TestViewsLocalTask
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ Derivative/ ViewsLocalTaskTest.php, line 370 - Contains \Drupal\Tests\views\Unit\Plugin\Derivative\ViewsLocalTaskTest.
Namespace
Drupal\Tests\views\Unit\Plugin\DerivativeView source
class TestViewsLocalTask extends ViewsLocalTask {
protected $result;
/**
* Sets applicable views result.
*/
public function setApplicableMenuViews($result) {
$this->result = $result;
}
/**
* {@inheritdoc}
*/
protected function getApplicableMenuViews() {
return $this->result;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
TestViewsLocalTask:: |
protected | property | ||
TestViewsLocalTask:: |
protected | function |
Return a list of all views and display IDs that have a menu entry. Overrides ViewsLocalTask:: |
|
TestViewsLocalTask:: |
public | function | Sets applicable views result. | |
ViewsLocalTask:: |
protected | property | The route provider. | |
ViewsLocalTask:: |
protected | property | The state key value store. | |
ViewsLocalTask:: |
protected | property | The view storage. | |
ViewsLocalTask:: |
public | function | Alters base_route and parent_id into the views local tasks. | |
ViewsLocalTask:: |
public static | function | ||
ViewsLocalTask:: |
public | function | ||
ViewsLocalTask:: |
public | function | Constructs a \Drupal\views\Plugin\Derivative\ViewsLocalTask instance. |