本文整理汇总了PHP中SinglePage::getThemeableCorePages方法的典型用法代码示例。如果您正苦于以下问题:PHP SinglePage::getThemeableCorePages方法的具体用法?PHP SinglePage::getThemeableCorePages怎么用?PHP SinglePage::getThemeableCorePages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SinglePage
的用法示例。
在下文中一共展示了SinglePage::getThemeableCorePages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFilesInTheme
public function getFilesInTheme() {
Loader::model('collection_types');
Loader::model('single_page');
$dh = Loader::helper('file');
$ctlist = CollectionType::getList();
$cts = array();
foreach($ctlist as $ct) {
$cts[] = $ct->getCollectionTypeHandle();
}
$filesTmp = $dh->getDirectoryContents($this->ptDirectory);
foreach($filesTmp as $f) {
if (strrchr($f, '.') == PageTheme::THEME_EXTENSION) {
$fHandle = substr($f, 0, strpos($f, '.'));
if ($f == FILENAME_THEMES_VIEW) {
$type = PageThemeFile::TFTYPE_VIEW;
} else if ($f == FILENAME_THEMES_DEFAULT) {
$type = PageThemeFile::TFTYPE_DEFAULT;
} else if (in_array($f, SinglePage::getThemeableCorePages())) {
$type = PageThemeFile::TFTYPE_SINGLE_PAGE;
} else if (in_array($fHandle, $cts)) {
$type = PageThemeFile::TFTYPE_PAGE_TYPE_EXISTING;
} else {
$type = PageThemeFile::TFTYPE_PAGE_TYPE_NEW;
}
$pf = new PageThemeFile();
$pf->setFilename($f);
$pf->setType($type);
$files[] = $pf;
}
}
return $files;
}