TestLocalAction4.php
Same filename in other branches
Namespace
Drupal\menu_test\Plugin\Menu\LocalActionFile
-
core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Menu/ LocalAction/ TestLocalAction4.php
View source
<?php
namespace Drupal\menu_test\Plugin\Menu\LocalAction;
use Drupal\Core\Menu\LocalActionDefault;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Symfony\Component\HttpFoundation\Request;
/**
* Defines a local action plugin with a dynamic title.
*/
class TestLocalAction4 extends LocalActionDefault {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
public function getTitle(Request $request = NULL) {
return $this->t('My @arg action', [
'@arg' => 'dynamic-title',
]);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
TestLocalAction4 | Defines a local action plugin with a dynamic title. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.