本文整理汇总了PHP中XLite\Core\Converter::buildFullURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Converter::buildFullURL方法的具体用法?PHP Converter::buildFullURL怎么用?PHP Converter::buildFullURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XLite\Core\Converter
的用法示例。
在下文中一共展示了Converter::buildFullURL方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: performRedirectToCleanURL
/**
* Redirect to clean URL
*
* @return void
*/
protected function performRedirectToCleanURL()
{
$data = \XLite\Core\Request::getInstance()->getGetData();
if (\XLite::TARGET_DEFAULT === ($target = $this->getTarget())) {
$target = '';
} else {
unset($data['target']);
}
$this->setReturnURL(\XLite\Core\Converter::buildFullURL($target, '', $data));
}
示例2: prepareDataForNotification
/**
* Prepare data for 'low limit warning' email notifications
*
* @return array
*/
protected function prepareDataForNotification()
{
$data = array();
$product = $this->getProduct();
$data['product'] = $product;
$data['name'] = $product->getName();
$data['sku'] = $this->getDisplaySku();
$data['amount'] = $this->getAmount();
$params = array('product_id' => $product->getProductId(), 'page' => 'inventory');
$data['adminURL'] = \XLite\Core\Converter::buildFullURL('product', '', $params, \XLite::getAdminScript());
return $data;
}
示例3: setBreadcrumbs
/**
* Set LC breadcrumbs
*
* @return void
*/
protected function setBreadcrumbs()
{
$widget = $this->getHandler()->getWidget('\\XLite\\View\\Location');
$lcNodes = array_map(function (\XLite\View\Location\Node $node) {
return $node->getContent();
}, $widget->getNodes());
array_shift($lcNodes);
// Add store root node
$trails = menu_get_active_trail();
array_splice($trails, 1, 0, array(array('title' => t('Store'), 'href' => \XLite\Core\Converter::buildFullURL(), 'link_path' => '', 'localized_options' => array(), 'type' => MENU_VISIBLE_IN_BREADCRUMB)));
menu_set_active_trail($trails);
$drupalNodes = array_slice(drupal_get_breadcrumb(), 0, 2);
drupal_set_breadcrumb(array_merge($drupalNodes, $lcNodes));
}
示例4: getCOMMODITY_URLColumnValue
/**
* Get column value for 'enabled' column
*
* @param array $dataset Dataset
* @param string $name Column name
* @param integer $i Subcolumn index
*
* @return string
*/
protected function getCOMMODITY_URLColumnValue(array $dataset, $name, $i)
{
return \XLite\Core\Converter::buildFullURL('product', '', array('product_id' => $dataset['model']->getId()));
}
示例5: buildFullURL
/**
* Compose complete URL from target, action and additional params
*
* @param string $target Page identifier OPTIONAL
* @param string $action Action to perform OPTIONAL
* @param array $params Additional params OPTIONAL
*
* @return string
*/
public function buildFullURL($target = '', $action = '', array $params = array())
{
return \XLite\Core\Converter::buildFullURL($target, $action, $params);
}
示例6: getURLColumnValue
/**
* Get column value for 'enabled' column
*
* @param array $dataset Dataset
* @param string $name Column name
* @param integer $i Subcolumn index
*
* @return string
*/
protected function getURLColumnValue(array $dataset, $name, $i)
{
return \XLite\Core\Converter::buildFullURL('category', '', array('category_id' => $dataset['model']->getId()));
}
示例7: getCategories
/**
* Get categories data
*
* @param $start
* @param $limit
*
* @return array
*/
public function getCategories($start, $limit)
{
$repo = Database::getRepo('XLite\\Model\\Category');
$cnd = new CommonCell();
$cnd->{\XLite\Model\Repo\Category::SEARCH_LIMIT} = array($start, $limit);
$categories = $repo->search($cnd, false);
$categoriesArray = array();
$rootCatId = Database::getRepo('XLite\\Model\\Category')->getRootCategoryId();
foreach ($categories as $category) {
$parentId = $category->getParentId() == $rootCatId ? 0 : $category->getParentId();
$categoryHash = array('id' => $category->getCategoryId(), 'name' => $category->getName(), 'description' => $category->getViewDescription(), 'parent' => $parentId);
if ($category->getImage()) {
list($categoryHash['image_width'], $categoryHash['image_height'], $categoryHash['image_src']) = $category->getImage()->getResizedURL(static::MAX_THUMBNAIL_WIDTH, static::MAX_THUMBNAIL_HEIGHT);
}
$categoryHash['url'] = Converter::buildFullURL('category', '', array('category_id' => $category->getCategoryId()));
$categoriesArray[] = $categoryHash;
}
return $categoriesArray;
}
示例8: getOrderAdminUrl
/**
* Returns orders full url in admin area
*
* @return string
*/
protected function getOrderAdminUrl()
{
return \XLite\Core\Converter::buildFullURL('order', '', array('order_number' => $this->getOrder()->getOrderNumber()), \XLite::ADMIN_SELF);
}
示例9: getDownloadURL
/**
* Get download URL for customer front-end by key
*
* @return string
*/
public function getDownloadURL(\XLite\Module\CDev\Egoods\Model\OrderItem\PrivateAttachment $attachment)
{
$params = $this->getGetterParams();
$params['key'] = $attachment->getDownloadKey();
return \XLite\Core\Converter::buildFullURL('storage', 'download', $params, \XLite::getCustomerScript());
}
示例10: getRedirectCanonicalURL
/**
* Analyze current target and request params and get a canonical redirect URL or null if redirect is not needed
*
* @param string $target
*
* @return string
*/
public function getRedirectCanonicalURL($target)
{
$result = null;
if ($this->isUseCanonicalURL()) {
// Option use_canonical_urls_only is enabled: try to get canonical URL to redirect...
$tmp = \XLite\Core\Request::getInstance();
if ('product' === $target) {
if (!empty($tmp->last)) {
list($target, $params) = $this->parseURL($tmp->url, $tmp->last, $tmp->rest, $tmp->ext);
$result = \XLite\Core\Converter::buildFullURL($target, '', $params);
}
}
}
return $result;
}
示例11: getWizardReturnUrl
/**
* Get merchant registration wizard return URL
*
* @return string
*/
public function getWizardReturnUrl()
{
return \XLite\Core\Converter::buildFullURL();
}