本文整理汇总了PHP中PageType::getByDefaultsPage方法的典型用法代码示例。如果您正苦于以下问题:PHP PageType::getByDefaultsPage方法的具体用法?PHP PageType::getByDefaultsPage怎么用?PHP PageType::getByDefaultsPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageType
的用法示例。
在下文中一共展示了PageType::getByDefaultsPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
defined('C5_EXECUTE') or die("Access Denied.");
use Concrete\Core\Page\Type\Composer\OutputControl as PageTypeComposerOutputControl;
use Concrete\Core\Page\Type\Composer\FormLayoutSetControl as PageTypeComposerFormLayoutSetControl;
$c = Page::getCurrentPage();
// retrieve all block controls attached to this page template.
$pt = PageTemplate::getByID($c->getPageTemplateID());
$ptt = PageType::getByDefaultsPage($c);
$controls = PageTypeComposerOutputControl::getList($ptt, $pt);
$values = array();
foreach ($controls as $control) {
$fls = PageTypeComposerFormLayoutSetControl::getByID($control->getPageTypeComposerFormLayoutSetControlID());
$cc = $fls->getPageTypeComposerControlObject();
$values[$control->getPageTypeComposerOutputControlID()] = $cc->getPageTypeComposerControlName();
}
$form = Loader::helper('form');
?>
<div class="form-group">
<label for="ptComposerOutputControlID" class="control-label"><?php
echo t('Control');
?>
</label>
<?php
echo $form->select('ptComposerOutputControlID', $values, $ptComposerOutputControlID);
?>
</div>