protected function filterPageList($obPageList)
    {
        $arCmsPageList = [];
        if (empty($obPageList) || $obPageList->isEmpty()) {
            return $arCmsPageList;
        }

        /** @var CmsPage $obPage */
        foreach ($obPageList as $obPage) {
            if (!$obPage->hasComponent('CategoryPage')) {
                continue;
            }

            /*
             * Component must use a category filter with a routing parameter
             * eg: categoryFilter = "{{ :somevalue }}"
             */
            $arPropertyList = $obPage->getComponentProperties('CategoryPage');
            if (!isset($arPropertyList['slug']) || !preg_match('/{{\s*:/', $arPropertyList['slug'])) {
                continue;
            }
            $arCmsPageList[] = $obPage;
        }

        return $arCmsPageList;
    }
protected function filterPageList($obPageList)
    {
        $arCmsPageList = [];
        if (empty($obPageList) || $obPageList->isEmpty()) {
            return $arCmsPageList;
        }

        /** @var CmsPage $obPage */
        foreach ($obPageList as $obPage) {
            if (!$obPage->hasComponent('CategoryPage')) {
                continue;
            }

            /*
             * Component must use a category filter with a routing parameter
             * eg: categoryFilter = "{{ :somevalue }}"
             */
            $arPropertyList = $obPage->getComponentProperties('CategoryPage');
            if (!isset($arPropertyList['slug']) || !preg_match('/{{\s*:/', $arPropertyList['slug'])) {
                continue;
            }
            $arCmsPageList[] = $obPage;
        }

        return $arCmsPageList;
    }
protected function filterPageList ( $ obPageList ) { $ arCmsPageList = [ ] ; if ( empty ( $ obPageList ) || $ obPageList -> isEmpty ( ) ) { return $ arCmsPageList ; } /** @var CmsPage $obPage */ foreach ( $ obPageList as $ obPage ) { if ( ! $ obPage -> hasComponent ( 'CategoryPage' ) ) { continue ; } /*
             * Component must use a category filter with a routing parameter
             * eg: categoryFilter = "{{ :somevalue }}"
             */ $ arPropertyList = $ obPage -> getComponentProperties ( 'CategoryPage' ) ; if ( ! isset ( $ arPropertyList [ 'slug' ] ) || ! preg_match ( '/{{\s*:/' , $ arPropertyList [ 'slug' ] ) ) { continue ; } $ arCmsPageList [ ] = $ obPage ; } return $ arCmsPageList ; }
Filter page list, add pages with CategoryPage component to result
@param \October\Rain\Support\Collection $obPageList
@return array
Filter page list add pages with CategoryPage component to result