本文整理汇总了PHP中Loader::Helper方法的典型用法代码示例。如果您正苦于以下问题:PHP Loader::Helper方法的具体用法?PHP Loader::Helper怎么用?PHP Loader::Helper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader::Helper方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$textHelper = Loader::helper("text");
$imgHelper = Loader::Helper('image');
// now that we're in the specialized content file for this block type,
// we'll include this block type's class, and pass the block to it, and get
// the content
if (count($cArray) > 0) {
?>
<?php
for ($i = 0; $i < count($cArray); $i++) {
$cobj = $cArray[$i];
$target = $cobj->getAttribute('nav_target');
$title = $cobj->getCollectionName();
$date = $cobj->getCollectionDatePublic('Y/m/d');
?>
<div class="grid_4 main-content-thumb">
<h4><?php
echo "— " . $date;
?>
</h4>
<div class="image-link">
<a <?php
if ($target != '') {
?>
target="<?php
echo $target;
?>
示例2: defined
<?php
defined('C5_EXECUTE') or die("Access Denied.");
?>
<?php
$_c = Page::getCurrentPage();
$valt = Loader::Helper('validation/token');
$token = '&' . $valt->getParameter();
if ($_c->getCollectionPath() != '/dashboard/news' && $_c->getCollectionPath() != '/dashboard/welcome' && !$_GET['_ccm_dashboard_external']) {
?>
<div class="well" style="margin-bottom: 0px">
<?php
if ($_c->isCheckedOut()) {
?>
<a href="#" id="ccm-nav-save-arrange" class="btn ccm-main-nav-arrange-option" style="display: none"><?php
echo t('Save Positioning');
?>
</a>
<a href="<?php
echo DIR_REL;
?>
/<?php
echo DISPATCHER_FILENAME;
?>
?cID=<?php
echo $_c->getCollectionID();
?>
&approve=APPROVE&ctask=check-in&<?php
echo Loader::helper('validation/token')->getParameter();
?>
示例3: elseif
">
<div>
<?php
echo $form->checkbox($controller->field('fileIDs') . "[]", $fileID, true);
?>
<?php
if ($templType == "js") {
?>
<?php
echo $fileThumb;
?>
<?php
} elseif ($templType == "inline") {
$image = File::getById($fileID);
$ih = Loader::Helper('image');
$ext = $image->getExtension();
if (in_array($ext, ['jpeg', 'png', 'gif', 'jpg'])) {
$thumb = $ih->getThumbnail($image, 32, 32, true);
echo "<img src='{$thumb->src}'>";
} elseif (file_exists(DIR_AL_ICONS . "/{$ext}.png")) {
$path = \Core::getApplicationRelativePath() . "/concrete/images/icons/filetypes/{$ext}.png";
echo "<img width='32' height='32' src='{$path}'>";
}
?>
<?php
}
?>
<span>
<a class="title" href="<?php
示例4: defined
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$form = Loader::Helper('form');
$selectedThemeID = 0;
$selectedTemplateID = 0;
if (is_object($selectedTheme)) {
$selectedThemeID = $selectedTheme->getThemeID();
}
if (is_object($selectedTemplate)) {
$selectedTemplateID = $selectedTemplate->getPageTemplateID();
}
if (is_object($selectedType)) {
$selectedTypeID = $selectedType->getPageTypeID();
}
?>
<div class="ccm-ui">
<form method="post" data-dialog-form="design" action="<?php
echo $controller->action('submit');
?>
">
<input type="hidden" name="sitemap" value="1" />
<?php
if ($cp->canEditPageTemplate()) {
?>
<?php
echo $form->label('pTemplateID', t('Page Template'));
?>
示例5: defined
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$textHelper = Loader::helper("text");
$imgHelper = Loader::Helper('image');
$dateHelper = Loader::Helper('date');
/* @var $dateHelper DateHeler */
// now that we're in the specialized content file for this block type,
// we'll include this block type's class, and pass the block to it, and get
// the content
if (count($cArray) > 0) {
?>
<?php
for ($i = 0; $i < count($cArray); $i++) {
$cobj = $cArray[$i];
$target = $cobj->getAttribute('nav_target');
$title = $cobj->getCollectionName();
$date = $dateHelper->formatDate($cobj->getCollectionDatePublic(), true);
?>
<div class="grid_4 main-content-thumb">
<h4><?php
echo "— " . $date;
?>
</h4>
<div class="image-link">
<a <?php
if ($target != '') {
?>
target="<?php
示例6: validate
protected function validate()
{
$vt = Loader::helper('validation/strings');
$vn = Loader::Helper('validation/numbers');
$dt = Loader::helper("form/date_time");
if (!$vn->integer($this->post('cParentID'))) {
$this->error->add(t('You must choose a parent page for this News entry.'));
}
if (!$vn->integer($this->post('ctID'))) {
$this->error->add(t('You must choose a page type for this News entry.'));
}
if (!$vt->notempty($this->post('newsTitle'))) {
$this->error->add(t('Title is required'));
}
if (!$this->error->has()) {
Loader::model('collection_types');
$ct = CollectionType::getByID($this->post('ctID'));
$parent = Page::getByID($this->post('cParentID'));
$parentPermissions = new Permissions($parent);
if (!$parentPermissions->canAddSubCollection($ct)) {
$this->error->add(t('You do not have permission to add a page of that type to that area of the site.'));
}
}
}
示例7: defined
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$form = Loader::helper("form");
$nv = Loader::Helper('navigation');
?>
<div class="pageEntry" id="<?php
echo $akID;
?>
_pageAttachmentRow<?php
echo $pageID;
?>
">
<div>
<?php
if ($mode == "multi") {
?>
<?php
echo $form->checkbox($controller->field('pageIDs') . "[]", $pageID, true);
?>
<?php
} else {
?>
<?php
echo $form->hidden($controller->field('pageIDs') . "[]", $pageID);
?>
<?php
}
?>
<span>