本文整理汇总了PHP中URL::page方法的典型用法代码示例。如果您正苦于以下问题:PHP URL::page方法的具体用法?PHP URL::page怎么用?PHP URL::page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类URL
的用法示例。
在下文中一共展示了URL::page方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDateLink
public function getDateLink($dateArray = null)
{
if ($this->cTargetID) {
$c = \Page::getByID($this->cTargetID);
} else {
$c = \Page::getCurrentPage();
}
if ($dateArray) {
return \URL::page($c, $dateArray['year'], $dateArray['month']);
} else {
return \URL::page($c);
}
}
示例2: getTopicLink
public function getTopicLink(\Concrete\Core\Tree\Node\Node $topic = null)
{
if ($this->cParentID) {
$c = \Page::getByID($this->cParentID);
} else {
$c = \Page::getCurrentPage();
}
if ($topic) {
$nodeName = $topic->getTreeNodeName();
$nodeName = strtolower($nodeName);
// convert to lowercase
$nodeName = Core::make('helper/text')->encodePath($nodeName);
// urlencode
return \URL::page($c, 'topic', $topic->getTreeNodeID(), $nodeName);
} else {
return \URL::page($c);
}
}
示例3:
echo $pID;
?>
">
<div class="cart-list-thumb">
<a href="<?php
echo URL::page(Page::getByID($product->getProductPageID()));
?>
">
<?php
echo $product->getProductImageThumb();
?>
</a>
</div>
<div class="cart-list-product-name">
<a href="<?php
echo URL::page(Page::getByID($product->getProductPageID()));
?>
">
<?php
echo $product->getProductName();
?>
</a>
</div>
<div class="cart-list-item-price">
<?php
echo Price::format($product->getProductPrice());
?>
</div>
<div class="cart-list-product-qty">
<span class="cart-item-label"><?php
示例4: t
<?php
echo $form->label('ftTypeHeight', t('Height'));
?>
<?php
echo $form->text('ftTypeHeight', $ftTypeHeight);
?>
</div>
<div class="alert alert-info"><i class="fa fa-exclamation-circle"></i> <?php
echo t('Only place a value in here if you want this thumbnail to force its dimensions to the width and height.');
?>
</div>
</fieldset>
<div class="ccm-dashboard-form-actions-wrapper">
<div class="ccm-dashboard-form-actions">
<a href="<?php
echo URL::page($c);
?>
" class="btn pull-left btn-default"><?php
echo t('Back');
?>
</a>
<?php
if (is_object($type)) {
?>
<button type="submit" class="btn btn-primary pull-right"><?php
echo t('Save');
?>
</button>
<?php
} else {
?>
示例5: testCanonicalUrlWithPort
public function testCanonicalUrlWithPort()
{
Config::set('concrete.seo.canonical_url', 'http://www.derpco.com:8080');
$this->clearCanonicalUrl();
$this->assertEquals('http://www.derpco.com:8080/path/to/server/index.php/dashboard/my/awesome/page', (string) URL::to('/dashboard/my/awesome/page'));
$this->assertEquals('http://www.derpco.com:8080/path/to/server/index.php/dashboard/my/awesome/page', (string) URL::page($this->dashboard));
Config::set('concrete.seo.canonical_url', null);
}
示例6: array
@Loader::element('attribute/categories/' . $category->getAttributeKeyCategoryHandle(), array('key' => $key));
}
?>
<?php
}
?>
<?php
echo $valt->output('add_or_update_attribute');
$type->render(new \Concrete\Core\Attribute\Context\AttributeTypeSettingsContext(), $key);
?>
<?php
if (!isset($back)) {
$back = URL::page($c);
}
?>
<div class="ccm-dashboard-form-actions-wrapper">
<div class="ccm-dashboard-form-actions">
<a href="<?php
echo $back;
?>
" class="btn pull-left btn-default"><?php
echo t('Back');
?>
</a>
<?php
if (is_object($key)) {
?>
示例7: getTagLink
public function getTagLink(Option $option = null)
{
$target = $this->get('target');
if (!is_object($target)) {
$target = \Page::getCurrentPage();
}
if ($option) {
return \URL::page($target, 'tag', strtolower($option->getSelectAttributeOptionDisplayValue()));
} else {
return \URL::page($target);
}
}
示例8: redirect
function redirect($link, $extra = array(), $clean = false)
{
$url = new URL();
$url->initCurURL();
if ($clean) {
$url->clean();
}
$url->page($link);
foreach ($extra as $key => $value) {
$url->setGet($key, $value);
}
return $url->getUrl();
}
示例9: getTopicLink
public function getTopicLink(\Concrete\Core\Tree\Node\Node $topic = null)
{
if ($this->cParentID) {
$c = \Page::getByID($this->cParentID);
} else {
$c = \Page::getCurrentPage();
}
if ($topic) {
return \URL::page($c, 'topic', strtolower($topic->getTreeNodeDisplayName()));
} else {
return \URL::page($c);
}
}