public function getLayoutOptions()
    {
        if (!($theme = Theme::getEditTheme())) {
            throw new ApplicationException(Lang::get('cms::lang.theme.edit.not_found'));
        }

        $layouts = Layout::listInTheme($theme, true);
        $result = [];
        $result[null] = Lang::get('cms::lang.page.no_layout');

        foreach ($layouts as $layout) {
            $baseName = $layout->getBaseFileName();

            if (FileDefinitions::isPathIgnored($baseName)) {
                continue;
            }

            $result[$baseName] = strlen($layout->name) ? $layout->name : $baseName;
        }

        return $result;
    }
public function getLayoutOptions()
    {
        if (!($theme = Theme::getEditTheme())) {
            throw new ApplicationException(Lang::get('cms::lang.theme.edit.not_found'));
        }

        $layouts = Layout::listInTheme($theme, true);
        $result = [];
        $result[null] = Lang::get('cms::lang.page.no_layout');

        foreach ($layouts as $layout) {
            $baseName = $layout->getBaseFileName();

            if (FileDefinitions::isPathIgnored($baseName)) {
                continue;
            }

            $result[$baseName] = strlen($layout->name) ? $layout->name : $baseName;
        }

        return $result;
    }
public function getLayoutOptions ( ) { if ( ! ( $ theme = Theme :: getEditTheme ( ) ) ) { throw new ApplicationException ( Lang :: get ( 'cms::lang.theme.edit.not_found' ) ) ; } $ layouts = Layout :: listInTheme ( $ theme , true ) ; $ result = [ ] ; $ result [ null ] = Lang :: get ( 'cms::lang.page.no_layout' ) ; foreach ( $ layouts as $ layout ) { $ baseName = $ layout -> getBaseFileName ( ) ; if ( FileDefinitions :: isPathIgnored ( $ baseName ) ) { continue ; } $ result [ $ baseName ] = strlen ( $ layout -> name ) ? $ layout -> name : $ baseName ; } return $ result ; }
Returns a list of layouts available in the theme.
This method is used by the form widget.
@return array Returns an array of strings.
Returns a list of layouts available in the theme . This method is used by the form widget .