class PagesRestrictionHelper in Pages Restriction Access 8
Helper for Pages Restriction.
Hierarchy
- class \Drupal\pages_restriction\Service\PagesRestrictionHelper
Expanded class hierarchy of PagesRestrictionHelper
1 file declares its use of PagesRestrictionHelper
1 string reference to 'PagesRestrictionHelper'
1 service uses PagesRestrictionHelper
File
- src/
Service/ PagesRestrictionHelper.php, line 10
Namespace
Drupal\pages_restriction\ServiceView source
class PagesRestrictionHelper {
/**
* Get Restricted Pages by Config.
*/
public function getRestrictedPagesByConfig($configRestrictedPages) {
if (empty($configRestrictedPages)) {
return FALSE;
}
$restrictedPages = [];
foreach ($configRestrictedPages as $restrictedPage) {
$restrictedPage = explode('|', $restrictedPage);
if (empty($restrictedPage)) {
continue;
}
$restrictedPath = Xss::filter($restrictedPage[0]);
$restrictedPath = trim($restrictedPath);
$restrictedPages[] = $restrictedPath;
}
return $restrictedPages;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PagesRestrictionHelper:: |
public | function | Get Restricted Pages by Config. |