Issue #2291137 by cilefen | webchick: Rename various *links.yml files to improve DX.

8.0.x
Alex Pott 2014-07-15 12:29:14 +01:00
parent 351352e952
commit f2b6aa7a75
74 changed files with 9 additions and 9 deletions

View File

@ -163,7 +163,7 @@ use Drupal\Core\Template\Attribute;
* Local tasks appear as tabs on a page when there are at least two defined for
* a route, including the base route as the main tab, and additional routes as
* other tabs. Static local tasks can be defined by adding lines like the
* following to a module_name.local_tasks.yml file (in the top-level directory
* following to a module_name.links.task.yml file (in the top-level directory
* for your module):
* @code
* book.admin:
@ -196,7 +196,7 @@ use Drupal\Core\Template\Attribute;
* instance, adding content is a common operation for the content management
* page, so it should be a local action. Static local actions can be
* defined by adding lines like the following to a
* module_name.local_actions.yml file (in the top-level directory for your
* module_name.links.action.yml file (in the top-level directory for your
* module):
* @code
* node.add_page:
@ -235,7 +235,7 @@ use Drupal\Core\Template\Attribute;
*
* To declare that a defined route should be a contextual link for a
* contextual links group, put lines like the following in a
* module_name.contextual_links.yml file (in the top-level directory for your
* module_name.links.contextual.yml file (in the top-level directory for your
* module):
* @code
* block_configure:

View File

@ -103,7 +103,7 @@ class ContextualLinkManager extends DefaultPluginManager implements ContextualLi
* The request stack.
*/
public function __construct(ControllerResolverInterface $controller_resolver, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LanguageManager $language_manager, AccessManager $access_manager, AccountInterface $account, RequestStack $request_stack) {
$this->discovery = new YamlDiscovery('contextual_links', $module_handler->getModuleDirectories());
$this->discovery = new YamlDiscovery('links.contextual', $module_handler->getModuleDirectories());
$this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
$this->factory = new ContainerFactory($this);

View File

@ -122,7 +122,7 @@ class LocalActionManager extends DefaultPluginManager {
public function __construct(ControllerResolverInterface $controller_resolver, RequestStack $request_stack, RouteProviderInterface $route_provider, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LanguageManagerInterface $language_manager, AccessManager $access_manager, AccountInterface $account) {
// Skip calling the parent constructor, since that assumes annotation-based
// discovery.
$this->discovery = new YamlDiscovery('local_actions', $module_handler->getModuleDirectories());
$this->discovery = new YamlDiscovery('links.action', $module_handler->getModuleDirectories());
$this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
$this->factory = new ContainerFactory($this);
$this->controllerResolver = $controller_resolver;

View File

@ -128,7 +128,7 @@ class LocalTaskManager extends DefaultPluginManager {
* The current user.
*/
public function __construct(ControllerResolverInterface $controller_resolver, RequestStack $request_stack, RouteProviderInterface $route_provider, RouteBuilderInterface $route_builder, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManager $language_manager, AccessManager $access_manager, AccountInterface $account) {
$this->discovery = new YamlDiscovery('local_tasks', $module_handler->getModuleDirectories());
$this->discovery = new YamlDiscovery('links.task', $module_handler->getModuleDirectories());
$this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
$this->factory = new ContainerFactory($this);
$this->controllerResolver = $controller_resolver;

View File

@ -176,7 +176,7 @@ function contextual_pre_render_placeholder($element) {
* @param $element
* A renderable array containing a #contextual_links property, which is a
* keyed array. Each key is the name of the group of contextual links to
* render (based on the 'group' key in the *.contextual_links.yml files for
* render (based on the 'group' key in the *.links.contextual.yml files for
* all enabled modules). The value contains an associative array containing
* the following keys:
* - route_parameters: The route parameters passed to the url generator.

View File

@ -632,7 +632,7 @@
* call is \Drupal\Core\Datetime\Date::format().
* - Some YML files contain UI text that is automatically translatable:
* - *.routing.yml files: route titles. This also applies to
* *.local_tasks.yml, *.local_actions, and *.contextual_links.yml files.
* *.links.task.yml, *.links.action.yml, and *.links.contextual.yml files.
* - *.info.yml files: module names and descriptions.
* - For configuration, make sure any configuration that is displayable to
* users is marked as translatable in the configuration schema. Configuration

View File

@ -108,7 +108,7 @@ abstract class LocalTaskIntegrationTest extends UnitTestCase {
return isset($module_dirs[$module]);
}));
$pluginDiscovery = new YamlDiscovery('local_tasks', $module_dirs);
$pluginDiscovery = new YamlDiscovery('links.task', $module_dirs);
$pluginDiscovery = new ContainerDerivativeDiscoveryDecorator($pluginDiscovery);
$property = new \ReflectionProperty('Drupal\Core\Menu\LocalTaskManager', 'discovery');
$property->setAccessible(TRUE);