Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / front / src / FrontPagePathProcessor.php
index 1549e175d4b916363ce17defac0430f4a9add881..93c381d6905603a2494b4cba62a5073868f4c14e 100644 (file)
@@ -6,16 +6,22 @@ use Drupal\Core\PathProcessor\OutboundPathProcessorInterface;
 use Drupal\Core\Render\BubbleableMetadata;
 use Symfony\Component\HttpFoundation\Request;
 
+/**
+ * Class FrontPagePathProcessor.
+ *
+ * @package Drupal\front_page
+ */
 class FrontPagePathProcessor implements OutboundPathProcessorInterface {
 
   /**
    * {@inheritdoc}
    */
-  public function processOutbound($path, &$options = array(), Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
+  public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
     if ($path == '/main') {
       $path = '';
     }
-    $config  = \Drupal::config('front_page.settings');
+
+    $config = \Drupal::config('front_page.settings');
     $new_path = $config->get('home_link_path', '');
     if (($path === '/<front>' || empty($path)) && !empty($new_path)) {
       $path = '/' . $new_path;
@@ -24,4 +30,3 @@ class FrontPagePathProcessor implements OutboundPathProcessorInterface {
   }
 
 }
-?>
\ No newline at end of file