Processes the inbound path by resolving it to the front page if empty.
Expanded class hierarchy of PathProcessorFront
class PathProcessorFront implements InboundPathProcessorInterface, OutboundPathProcessorInterface {
/**
* A config factory for retrieving required config settings.
*
* @var \Drupal\Core\Config\ConfigFactory
*/
protected $config;
/**
* Constructs a PathProcessorFront object.
*
* @param Drupal\Core\Config\ConfigFactory $config
* A config factory for retrieving the site front page configuration.
*/
public function __construct(ConfigFactory $config) {
$this->config = $config;
}
/**
* Implements Drupal\Core\PathProcessor\InboundPathProcessorInterface::processInbound().
*/
public function processInbound($path, Request $request) {
if (empty($path)) {
$path = $this->config
->get('system.site')
->get('page.front');
if (empty($path)) {
$path = 'user';
}
}
return $path;
}
/**
* Implements Drupal\Core\PathProcessor\OutboundPathProcessorInterface::processOutbound().
*/
public function processOutbound($path, &$options = array(), Request $request = NULL) {
// The special path '<front>' links to the default front page.
if ($path == '<front>') {
$path = '';
}
return $path;
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PathProcessorFront:: |
protected | property | A config factory for retrieving required config settings. | |
PathProcessorFront:: |
public | function |
Implements Drupal\Core\PathProcessor\InboundPathProcessorInterface::processInbound(). Overrides InboundPathProcessorInterface:: |
|
PathProcessorFront:: |
public | function |
Implements Drupal\Core\PathProcessor\OutboundPathProcessorInterface::processOutbound(). Overrides OutboundPathProcessorInterface:: |
|
PathProcessorFront:: |
public | function | Constructs a PathProcessorFront object. |