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

Breadcrumb

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

class ParamNotConvertedException

Provides an exception class for a request parameter that was not converted.

Hierarchy

  • class \Drupal\Core\ParamConverter\ParamNotConvertedException extends \Drupal\Core\ParamConverter\Exception

Expanded class hierarchy of ParamNotConvertedException

5 files declare their use of ParamNotConvertedException
AccessManager.php in core/lib/Drupal/Core/Access/AccessManager.php
NodeTranslationExceptionSubscriber.php in core/modules/node/src/EventSubscriber/NodeTranslationExceptionSubscriber.php
ParamConversionEnhancer.php in core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php
PathBasedBreadcrumbBuilder.php in core/modules/system/src/PathBasedBreadcrumbBuilder.php
PathValidator.php in core/lib/Drupal/Core/Path/PathValidator.php

File

core/lib/Drupal/Core/ParamConverter/ParamNotConvertedException.php, line 8

Namespace

Drupal\Core\ParamConverter
View source
class ParamNotConvertedException extends \Exception {
    
    /**
     * The route name that was not converted.
     *
     * @var string
     */
    protected $routeName = "";
    
    /**
     * The raw parameters that were not converted.
     *
     * @var array
     */
    protected $rawParameters = [];
    
    /**
     * Constructs the ParamNotConvertedException.
     *
     * @param string $message
     *   The Exception message to throw.
     * @param int $code
     *   The Exception code.
     * @param \Exception $previous
     *   The previous exception used for the exception chaining.
     * @param string $route_name
     *   The route name that was not converted.
     * @param array $raw_parameters
     *   The raw parameters that were not converted.
     */
    public function __construct($message = "", $code = 0, ?\Exception $previous = NULL, $route_name = "", array $raw_parameters = []) {
        parent::__construct($message, $code, $previous);
        $this->routeName = $route_name;
        $this->rawParameters = $raw_parameters;
    }
    
    /**
     * Get the route name that was not converted.
     *
     * @return string
     *   The route name that was not converted.
     */
    public function getRouteName() {
        return $this->routeName;
    }
    
    /**
     * Get the raw parameters that were not converted.
     *
     * @return array
     *   The raw parameters that were not converted.
     */
    public function getRawParameters() {
        return $this->rawParameters;
    }

}

Members

Title Sort descending Modifiers Object type Summary
ParamNotConvertedException::$rawParameters protected property The raw parameters that were not converted.
ParamNotConvertedException::$routeName protected property The route name that was not converted.
ParamNotConvertedException::getRawParameters public function Get the raw parameters that were not converted.
ParamNotConvertedException::getRouteName public function Get the route name that was not converted.
ParamNotConvertedException::__construct public function Constructs the ParamNotConvertedException.

API Navigation

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