class BrokenInboundPathProcessor in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/update_script_test/src/PathProcessor/BrokenInboundPathProcessor.php \Drupal\update_script_test\PathProcessor\BrokenInboundPathProcessor
- 9 core/modules/system/tests/modules/update_script_test/src/PathProcessor/BrokenInboundPathProcessor.php \Drupal\update_script_test\PathProcessor\BrokenInboundPathProcessor
Example path processor which breaks on inbound.
Hierarchy
- class \Drupal\update_script_test\PathProcessor\BrokenInboundPathProcessor implements InboundPathProcessorInterface
Expanded class hierarchy of BrokenInboundPathProcessor
1 string reference to 'BrokenInboundPathProcessor'
- update_script_test.services.yml in core/
modules/ system/ tests/ modules/ update_script_test/ update_script_test.services.yml - core/modules/system/tests/modules/update_script_test/update_script_test.services.yml
1 service uses BrokenInboundPathProcessor
- update_script_test.broken_path_processor in core/
modules/ system/ tests/ modules/ update_script_test/ update_script_test.services.yml - Drupal\update_script_test\PathProcessor\BrokenInboundPathProcessor
File
- core/
modules/ system/ tests/ modules/ update_script_test/ src/ PathProcessor/ BrokenInboundPathProcessor.php, line 12
Namespace
Drupal\update_script_test\PathProcessorView source
class BrokenInboundPathProcessor implements InboundPathProcessorInterface {
/**
* The state.
*
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructs a new BrokenInboundPathProcessor instance.
*
* @param \Drupal\Core\State\StateInterface $state
* The state.
*/
public function __construct(StateInterface $state) {
$this->state = $state;
}
/**
* {@inheritdoc}
*/
public function processInbound($path, Request $request) {
if ($this->state
->get('update_script_test_broken_inbound', FALSE)) {
throw new \RuntimeException();
}
else {
return $path;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BrokenInboundPathProcessor:: |
protected | property | The state. | |
BrokenInboundPathProcessor:: |
public | function |
Processes the inbound path. Overrides InboundPathProcessorInterface:: |
|
BrokenInboundPathProcessor:: |
public | function | Constructs a new BrokenInboundPathProcessor instance. |