SupernovaGenerator.php

Same filename in other branches
  1. 8.9.x core/modules/help/tests/modules/help_test/src/SupernovaGenerator.php
  2. 10 core/modules/help/tests/modules/help_test/src/SupernovaGenerator.php
  3. 11.x core/modules/help/tests/modules/help_test/src/SupernovaGenerator.php

Namespace

Drupal\help_test

File

core/modules/help/tests/modules/help_test/src/SupernovaGenerator.php

View source
<?php

namespace Drupal\help_test;

use Drupal\Core\Routing\UrlGeneratorInterface;
use Symfony\Component\Routing\RequestContext;

/**
 * Implements a URL generator which always thrown an exception.
 */
class SupernovaGenerator implements UrlGeneratorInterface {
    
    /**
     * {@inheritdoc}
     */
    public function setContext(RequestContext $context) {
        throw new \Exception();
    }
    
    /**
     * {@inheritdoc}
     */
    public function getContext() {
        throw new \Exception();
    }
    
    /**
     * {@inheritdoc}
     */
    public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) {
        throw new \Exception();
    }
    
    /**
     * {@inheritdoc}
     */
    public function getPathFromRoute($name, $parameters = []) {
        throw new \Exception();
    }
    
    /**
     * {@inheritdoc}
     */
    public function generateFromRoute($name, $parameters = [], $options = [], $collect_bubbleable_metadata = FALSE) {
        throw new \Exception();
    }
    
    /**
     * {@inheritdoc}
     */
    public function supports($name) {
        throw new \Exception();
    }
    
    /**
     * {@inheritdoc}
     */
    public function getRouteDebugMessage($name, array $parameters = []) {
        throw new \Exception();
    }

}

Classes

Title Deprecated Summary
SupernovaGenerator Implements a URL generator which always thrown an exception.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.