Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RouteCollection.php

function RouteCollection::addResource

Adds a resource for this collection. If the resource already exists it is not added.

1 call to RouteCollection::addResource()
RouteCollection::addCollection in vendor/symfony/routing/RouteCollection.php
Adds a route collection at the end of the current set by appending all routes of the added collection.

File

vendor/symfony/routing/RouteCollection.php, line 343

Class

RouteCollection
A RouteCollection represents a set of Route instances.

Namespace

Symfony\Component\Routing

Code

public function addResource(ResourceInterface $resource) : void {
    $key = (string) $resource;
    if (!isset($this->resources[$key])) {
        $this->resources[$key] = $resource;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal