Results
02.11.2019
admin_ui 8.x-1.x-dev ::
admin_ui_support.routing.yml
_controller: '\Drupal\admin_ui_support\Controller\EmptyController::noop'
options:
_admin_related_route: 'node.add_page'
_node_operation_route: TRUE
requirements:
_node_add_access: 'node'
admin_ui_support.node.add:
path: '/vfancy/node/add/{node_type}' 20.08.2019
ifthenelse 8.x-1.x-dev-no-core ::
modules/contrib/admin_toolbar/admin_toolbar_tools/admin_toolbar_tools.module
if ($moduleHandler->moduleExists('node')) {
$links['admin_toolbar_tools.add_content'] = $links['node.add_page'];
$links['admin_toolbar_tools.add_content']['parent'] = 'system.admin_content';
$links['node.type_add'] = [
'title' => t('Add content type'),
'provider' => 'admin_toolbar_tools',
'route_name' => 'node.type_add',
'menu_name' => 'admin', 14.02.2018
material_admin_support 8.x-1.x-dev ::
material_admin_support.module
// Convert the 'node add' page into FABs.
if (\Drupal::moduleHandler()->moduleExists('node') && isset($variables['content']['node.add_page'])) {
// Loop through all available node types, adding a button for each type of
// node the user has access to create.
/** @var \Drupal\node\NodeTypeInterface $type */
foreach ($manager->getStorage('node_type')->loadMultiple() as $type) {
// Check user access.
$access = $manager->getAccessControlHandler('node')->createAccess($type->id(), NULL, [], TRUE); 04.03.2021
custom_action_links 1.0.x-dev ::
tests/src/Functional/CustomActionLinksTest.php
// Assert a couple of route names are present. A full test would require
// a WebDriverTestBase test.
$assert->responseContains('node.add_page');
$assert->responseContains('node.configure_rebuild_confirm');
}
} 14.11.2024
installation_checklist 1.0.x-dev ::
installation_checklist.module
'link' => [
'#text' => t("Create content"),
'#url' => Url::fromRoute('node.add_page'),
],
],
'extend_drupal' => [
'#title' => t('Extend Drupal'),
'#description' => t('Extend Drupal with new functionalities.'),
'link' => [ 20.10.2020
admin_toolbar 8.x-2.x-dev ::
admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php
$links['node.add'] = [
'title' => $this->t('Add content'),
'route_name' => 'node.add_page',
'parent' => 'system.admin_content',
] + $base_plugin_definition;
// Adds node links for each content type.
foreach ($this->entityTypeManager->getStorage('node_type')->loadMultiple() as $type) {
$links['node.add.' . $type->id()] = [
'route_name' => 'node.add', 18.11.2020
admin_toolbar_content 1.0.0 ::
admin_toolbar_content.module
switch ($route) {
case 'node.add_page':
$route_name = 'node.add';
$entity_type_id = 'node_type';
$cache = TRUE;
break; 12.04.2020
bee_hotel 1.x-dev ::
modules/beehotel_pricealterator/beehotel_pricealterator.module
// @todo more granular permission.
if (\Drupal::currentUser()->hasPermission('administer bee_hotel')) {
$data['tabs'][0]['node.add_page'] = [
'#theme' => 'menu_local_task',
'#link' => [
'title' => t('Base Table'),
'url' => Url::fromUserInput('/node/' . $node->Id() . '/basepricetable'),
'localized_options' => [
'attributes' => [ 18.06.2024
book 2.0.x-dev ::
help_topics/book.adding.html.twig
---
{% set node_add_link_text %}{% trans %}Add content{% endtrans %}{% endset %}
{% set node_add_link = render_var(help_route_link(node_add_link_text, 'node.add_page')) %}
{% set configuring_topic = render_var(help_topic_link('book.configuring')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Add a page to an existing book.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Content</em> > <em>{{ node_add_link }}</em> > <em>Book page</em>. If you have configured additional content types that can be added to books, you can substitute a different content type for <em>Book page</em>; see {{ configuring_topic }} for more information.{% endtrans %}</li> 29.09.2020
bt_cms 8.x-1.x-dev ::
src/Routing/RouteSubscriber.php
'entity.block_content.edit_form' => '/app/website/block/{block_content}',
'entity.block_content.delete_form' => '/app/website/block/{block_content}/delete',
'node.add_page' => '/app/website/content/create',
'node.add' => '/app/website/content/create/{node_type}',
'system.admin_content' => '/app/website/content',
'content_moderation.admin_moderated_content' => '/app/website/content/moderated',
];
foreach ($routes as $route_name => $path) {
if ($route_name == 'node.add_page') {
$route->setDefaults([
'_controller' => '\Drupal\bt_cms\Controller\CustomNodeController::addPage',
'_title' => 'Create Content',
]);
}
} 29.09.2020
bt_cms 8.x-1.x-dev ::
src/Breadcrumb/BreadcrumbBuilder.php
'entity.node.edit_form',
'node.add',
'node.add_page',
'block_content.add_page',
'block_content.add_form',
'bt_core.app',
'bt_cms.website',
'system.admin_content',
'entity.block_content.collection',
if (in_array(
$route,
['entity.node.edit_form', 'node.add', 'node.add_page'])
) {
$breadcrumb->addLink(Link::createFromRoute('Content', 'system.admin_content'));
if ($route == 'node.add') {
$breadcrumb->addLink(Link::createFromRoute('Create Content', 'node.add_page'));
}
}
if (in_array($route, ['block_content.add_page', 'block_content.add_form'])) {
$breadcrumb->addLink(Link::createFromRoute('Blocks', 'entity.block_content.collection'));
if ($route == 'block_content.add_form') { 29.09.2020
bt_cms 8.x-1.x-dev ::
bt_cms.module
*/
function bt_cms_menu_local_actions_alter(&$local_actions) {
$local_actions['node.add_page']['appears_on'][0] = 'system.admin_content';
}
/**
* Implements hook_entity_base_field_info_alter().
*/
function bt_cms_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) { 21.12.2021
creation 1.0.0-beta1 ::
templates/includes/get-started.html.twig
{% set drupal_values = 'https://www.drupal.org/about/values-and-principles' %}
{% set drupal_user_guide = 'https://www.drupal.org/docs/user_guide/en/index.html' %}
{% set create_content = path('node.add_page') %}
{% set drupal_extend = 'https://www.drupal.org/docs/extending-drupal' %}
{% set drupal_global_training_days = 'https://groups.drupal.org/global-training-days' %}
{% set drupal_events = 'https://www.drupal.org/community/events' %}
{% set drupal_slack = 'https://www.drupal.org/slack' %}
{% set drupal_chat = 'https://www.drupal.org/drupalchat' %}
{% set drupal_answers = 'https://drupal.stackexchange.com/' %} 12.05.2020
custom_add_content 8.x-1.2 ::
src/Routing/CustomAddContentRouteSubscriber.php
public function alterRoutes(RouteCollection $collection) {
// Use a custom controller for path '/node/add'.
if ($route = $collection->get('node.add_page')) {
$route->setDefault('_controller', '\Drupal\custom_add_content\Controller\CustomAddContentController::addPage');
}
}
} 22.07.2024
devel_wizard 2.x-dev ::
templates/derivative/links-action/devel_wizard.entity-add-node.class.php.twig
protected string $contentEntityTypeId = 'node'; protected string $actionRouteName = 'node.add_page'; }
11.04.2024
domain_entity_type 1.0.0-rc2 ::
modules/det_node/src/Routing/NodeRouteSubscriber.php
*/
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection->get('node.add_page')) {
$route->setDefault('_controller', '\Drupal\det_node\Controller\NodeControllerOverride::addPage');
}
if ($route = $collection->get('entity.node_type.delete_form')) {
$route->setRequirement('_det_node_access_check', 'TRUE');
}
if ($route = $collection->get('node.add')) { 18.07.2020
examples 3.x-dev ::
modules/hooks_example/templates/description.html.twig
{% set help_hooks_example = path('help.page', {'name': 'hooks_example'}) %}
{% set node_add_page = path('node.add_page') %}
{% set user_login = path('user.login') %}
{% trans %}
<h2>Implementing, defining, and invoking hooks</h2> 04.04.2022
forum 1.x-dev ::
forum.module
':create-topic' => Url::fromRoute('node.add', ['node_type' => 'forum'])
->toString(),
':content-add' => Url::fromRoute('node.add_page')->toString(),
]) . '</dd>';
$output .= '<dt>' . t('Navigating in the forum') . '</dt>';
$output .= '<dd>' . t('Installing the Forum module provides a default <em>Forums</em> menu link in the Tools menu that links to the <a href=":forums">Forums page</a>.', [':forums' => Url::fromRoute('forum.index')->toString()]) . '</dd>';
$output .= '<dt>' . t('Moving forum topics') . '</dt>';
$output .= '<dd>' . t('A forum topic (and all of its comments) may be moved between forums by selecting a different forum while editing a forum topic. When moving a forum topic between forums, the <em>Leave shadow copy</em> option creates a link in the original forum pointing to the new location.') . '</dd>';
$output .= '<dt>' . t('Locking and disabling comments') . '</dt>'; 06.12.2024
genoring_theme 1.0.0-alpha1 ::
templates/includes/get-started.html.twig
{% set drupal_values = 'https://www.drupal.org/about/values-and-principles' %}
{% set drupal_user_guide = 'https://www.drupal.org/docs/user_guide/en/index.html' %}
{% set create_content = path('node.add_page') %}
{% set drupal_extend = 'https://www.drupal.org/docs/extending-drupal' %}
{% set drupal_global_training_days = 'https://groups.drupal.org/global-training-days' %}
{% set drupal_events = 'https://www.drupal.org/community/events' %}
{% set drupal_slack = 'https://www.drupal.org/slack' %}
{% set drupal_chat = 'https://www.drupal.org/drupalchat' %}
{% set drupal_answers = 'https://drupal.stackexchange.com/' %} 28.08.2020
gin_toolbar 8.x-1.x-dev ::
src/Menu/GinToolbarActiveTrail.php
if (in_array($route_name, [
'system.admin_content',
'node.add_page',
'entity.node.canonical',
'entity.node.edit_form',
])) {
$link = $this->getLinkByRoutes($menu_name, [
[$route_name, $route_params],
['system.admin_content', []],
$link = $this->getLinkByRoutes($menu_name, [
[$route_name, $route_params],
['node.add_page', []],
['system.admin_content', []],
]);
}
// Media.
if (in_array($route_name, [ 