Results

29.09.2020
bt_cms 8.x-1.x-dev :: src/Routing/RouteSubscriber.php
      '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 = $collection->get($route_name)) {
29.09.2020
bt_cms 8.x-1.x-dev :: src/Breadcrumb/BreadcrumbBuilder.php
  private $routes = [
    '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',
      elseif ($route_match->getRouteName() == 'node.add') {
        if ($route_match->getParameters()->get('node_type')->get('type') != 'faq' || $route_match->getParameters()->get('node_type')->get('type') != 'forum') {
          return TRUE;
        }
        else {
          return FALSE;
        }
    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'));
02.06.2025
ckeditor_taxonomy_glossary 1.0.0-alpha1 :: ckeditor_taxonomy_glossary.module
  // Attach modal utilities library and user permissions on node edit pages
  if (in_array($route_name, [
    'node.add',
    'entity.node.edit_form',
    'entity.node.content_translation_add',
    'entity.node.content_translation_edit',
  ])) {
    $current_user = \Drupal::currentUser();
    $language_manager = \Drupal::languageManager();
17.04.2020
coffee 8.x-1.x-dev :: tests/src/Kernel/CoffeeCommandsTest.php
    $expected_node = [
      'value' => Url::fromRoute('node.add', ['node_type' => 'page'])->toString(),
      'label' => 'Basic page',
      'command' => ':add Basic page',
    ];

    $commands = \Drupal::moduleHandler()->invokeAll('coffee_commands');
    // Convert the command labels to strings for the comparison.
17.04.2020
coffee 8.x-1.x-dev :: coffee.coffee.inc
    if ($entity_manager->getAccessControlHandler('node')->createAccess($node_type)) {
      $commands[] = [
        'value' => Url::fromRoute('node.add', ['node_type' => $node_type])->toString(),
        'label' => $type->label(),
        'command' => $command . ' ' . $type->label(),
      ];
    }
  }
13.10.2020
collection 8.x-1.x-dev :: src/Controller/CollectionNew.php
      foreach ($allowed_bundle_infos as $bundle => $bundle_info) {
        if ($entity_type_id === 'node') {
          $form_route_name = 'node.add';
        }
        elseif ($entity_type_id === 'user') {
          $form_route_name = 'user.admin_create';
        }
        else {
          $form_route_name = 'entity.' . $entity_type_id . '.add_form';
07.10.2020
content_entity_builder 8.x-1.x-dev :: src/Controller/ContentEntityBuilderController.php
    //if (count($content) == 1) {
    //  $type = array_shift($content);
    //  return $this->redirect('node.add', ['node_type' => $type->id()]);
    //}

    $build['#bundles'] = $bundles;

    return $build;
  }
16.07.2020
content_planner 8.x-1.x-dev :: modules/content_calendar/templates/content-calendar.html.twig
            <li>
                  <span class="label">
                    <a href="{{ path('node.add', {'node_type': entity_key}, {'query': {
                      'destination': path('content_calendar.calendar_redirect', {'year': calendar.year, 'month': calendar.month}),
                      'created': day.date,
                      'schedule': add_content_set_schedule_date ? 1 : 0,
                    }}) }}">{{ content_type_entity.label }}</a>
                  </span>
            </li>
16.07.2020
content_planner 8.x-1.x-dev :: modules/content_calendar/content_calendar.module
  // If the user is on a form to add a new node.
  if (\Drupal::routeMatch()->getRouteName() == 'node.add') {

    // Get Node Type from Route.
    $node_type = \Drupal::routeMatch()->getParameter('node_type');

    /**
     * Drupal\content_calendar\ContentTypeConfigService definition.
24.06.2020
create_and_translate 8.x-1.x-dev :: create_and_translate.module
  // We only handle these routes:
  $route_names = [
    'node.add',
    'entity.node.edit_form',
    'entity.node.content_translation_add',
    'entity.taxonomy_term.add_form',
    'entity.taxonomy_term.edit_form',
  ];
04.08.2021
createcontentwithcategory 1.0.0-alpha1 :: src/Ccwc.php
  public function makeUrl($term_id) {
    return Url::fromRoute('node.add', [
      'node_type' => $this->content_type,
    ], [
      'query' => [
        $this->prepopulateQueryKey() => $term_id,
      ],
    ]);
08.10.2018
custom_nodeformactions 8.x-1.x-dev :: custom_nodeformactions.module
function custom_nodeformactions_node_form_submit_saveandanother($form, FormStateInterface $form_state) {
  $node_type = $form['#process'][1][0]->getTargetBundle();
  $url = Url::fromRoute('node.add', ['node_type' => $node_type]);
  return $form_state->setRedirectUrl($url);
}

/**
 *
 */
09.10.2020
dashboards 8.x-1.0-beta10 :: src/Plugin/Dashboard/AddContentMenu.php
          $url_params['destination'] = $this->destination->get();
        }
        $url = Url::fromRoute('node.add', $url_params);
        $items[] = [
          'url' => $url,
          'title' => $bundleInfo[$bundle]['label'],
          'description' => ['#markup' => $types[$bundle]->getDescription()],
        ];
      }
15.07.2021
dependent_fields 1.0.0 :: tests/src/FunctionalJavascript/DependentFieldsView.php
    // Load the node/add page.
    $this->drupalGet(Url::fromRoute('node.add', [
      'node_type' => 'nodetype1',
    ]));
    $page = $this->getSession()->getPage();

    // Get the fields we will be testing.
    $triggeringField = $page->find('named', ['select', 'termfield1']);
21.08.2019
devportal 8.x-2.0-alpha10 :: modules/api_bundle/devportal_api_bundle.module
        ]),
        'parent' => 'entity.api_bundle.collection',
        'route_name' => 'node.add',
        'route_parameters' => [
          'node_type' => $type->id(),
        ],
      ];
      // Menu link for node bundle configuration.
      $links["entity.api_bundle.configuration.{$type->id()}"] = [
21.08.2019
devportal 8.x-2.0-alpha10 :: modules/api_reference/devportal_api_reference.module
      'title' => t('Add @type', ['@type' => $type_label]),
      'parent' => 'entity.api_ref.collection',
      'route_name' => 'node.add',
      'route_parameters' => [
        'node_type' => $type_id,
      ],
    ];

    // Menu link for node bundle configuration.
11.04.2024
domain_entity_type 1.0.0-rc2 :: modules/det_node/src/Routing/NodeRouteSubscriber.php
      $route->setRequirement('_det_node_access_check', 'TRUE');
    }
    if ($route = $collection->get('node.add')) {
      $route->setRequirement('_det_node_access_check', 'TRUE');
    }
    if ($route = $collection->get('entity.node.edit_form')) {
      $route->setRequirement('_det_node_access_check', 'TRUE');
    }
    if ($route = $collection->get('entity.node.delete_form')) {
26.09.2025
drupalorg 1.0.x-dev :: src/EventSubscriber/AllowedEntities.php
      // Node add form.
      $node_type = $this->currentRouteMatch->getParameter('node_type');
      if ($node_type && $this->currentRouteMatch->getRouteName() === 'node.add') {
        /** @var \Drupal\Node\Entity\NodeType $node_type */
        if (!in_array($node_type->id(), $allowed_types)) {
          $this->messenger->addWarning(t('It is not allowed to create %type pages in the site yet.', [
            '%type' => $node_type->id(),
          ]));
          $response = new RedirectResponse('/');
05.08.2020
drutopia_action 8.x-1.x-dev :: drutopia_action.links.action.yml
drutopia_action.add_action:
  route_name: 'node.add'
  route_parameters:
    node_type: 'action'
  title: 'Add action'
  appears_on:
    - view.action.page_listing
05.08.2020
drutopia_article 8.x-1.x-dev :: drutopia_article.links.action.yml
drutopia_article.add_article:
  route_name: 'node.add'
  route_parameters:
    node_type: 'article'
  title: 'Add article'
  appears_on:
    - view.article.page_listing

Pages

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc