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

Breadcrumb

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

class ControllerReference

Acts as a marker and a data holder for a Controller.

Some methods in Symfony accept both a URI (as a string) or a controller as an argument. In the latter case, instead of passing an array representing the controller, you can use an instance of this class.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

  • class \Symfony\Component\HttpKernel\Controller\ControllerReference

Expanded class hierarchy of ControllerReference

See also

FragmentRendererInterface

9 files declare their use of ControllerReference
AbstractSurrogateFragmentRenderer.php in vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php
FragmentHandler.php in vendor/symfony/http-kernel/Fragment/FragmentHandler.php
FragmentRendererInterface.php in vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php
FragmentUriGenerator.php in vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php
FragmentUriGeneratorInterface.php in vendor/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php

... See full list

File

vendor/symfony/http-kernel/Controller/ControllerReference.php, line 27

Namespace

Symfony\Component\HttpKernel\Controller
View source
class ControllerReference {
    public array $attributes = [];
    public array $query = [];
    
    /**
     * @param string $controller The controller name
     * @param array  $attributes An array of parameters to add to the Request attributes
     * @param array  $query      An array of parameters to add to the Request query string
     */
    public function __construct(string $controller, array $attributes = [], array $query = []) {
        $this->attributes = $attributes;
        $this->query = $query;
    }

}

Members

Title Sort descending Modifiers Object type Summary
ControllerReference::$attributes public property
ControllerReference::$query public property
ControllerReference::__construct public function

API Navigation

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