class SecurepagesPathProcessor in Secure Pages 8
Securepages path processor.
This path processor applies a configured secure base URL. It is useful for sites that have multiple insecure base URLs and an SSL certificate valid only for one secure base URL.
Hierarchy
- class \Drupal\securepages\SecurepagesPathProcessor implements OutboundPathProcessorInterface
Expanded class hierarchy of SecurepagesPathProcessor
1 string reference to 'SecurepagesPathProcessor'
1 service uses SecurepagesPathProcessor
File
- src/
SecurepagesPathProcessor.php, line 22 - Contains Drupal\securepages\SecurepagesPathProcessor.
Namespace
Drupal\securepagesView source
class SecurepagesPathProcessor implements OutboundPathProcessorInterface {
/**
* The configured secure login base URL.
*/
protected $baseUrl;
/**
* Constructs secure login path processor.
*/
public function __construct(ConfigFactoryInterface $config_factory) {
$this->baseUrl = $config_factory
->get('securepages.settings')
->get('basepath_ssl');
}
/**
* {@inheritdoc}
*/
public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
if (!empty($options['https']) && $this->baseUrl) {
$options['absolute'] = TRUE;
$options['base_url'] = $this->baseUrl;
}
return $path;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SecurepagesPathProcessor:: |
protected | property | The configured secure login base URL. | |
SecurepagesPathProcessor:: |
public | function |
Processes the outbound path. Overrides OutboundPathProcessorInterface:: |
|
SecurepagesPathProcessor:: |
public | function | Constructs secure login path processor. |