You are here

public static function TrailingSlashSettingsHelper::getActivePaths in Trailing Slash 8

Return value

array

1 call to TrailingSlashSettingsHelper::getActivePaths()
TrailingSlashOutboundPathProcessor::isPathInListWithTrailingSlash in src/PathProcessor/TrailingSlashOutboundPathProcessor.php

File

src/Helper/Settings/TrailingSlashSettingsHelper.php, line 48

Class

TrailingSlashSettingsHelper
Class TrailingSlashSettingsHelper

Namespace

Drupal\trailing_slash\Helper\Settings

Code

public static function getActivePaths() {
  static $active_paths;
  if (!isset($active_paths)) {
    $config = \Drupal::config('trailing_slash.settings');
    $paths = $config
      ->get('paths');
    $active_paths = explode("\n", str_replace("\r\n", "\n", $paths));
  }
  return $active_paths;
}