本文整理汇总了PHP中XLite\Core\Converter::buildDrupalPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Converter::buildDrupalPath方法的具体用法?PHP Converter::buildDrupalPath怎么用?PHP Converter::buildDrupalPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XLite\Core\Converter
的用法示例。
在下文中一共展示了Converter::buildDrupalPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateXMLSitemapLinks
/**
* Generate XML sitemap links
*
* @return void
*/
public function generateXMLSitemapLinks()
{
$iterator = new \XLite\Module\CDev\XMLSitemap\Logic\SitemapIterator();
$i = 0;
$options = xmlsitemap_get_changefreq_options();
$hash = array_flip($options);
foreach ($iterator as $record) {
$target = $record['loc']['target'];
unset($record['loc']['target']);
$record['loc'] = \XLite\Core\Converter::buildDrupalPath($target, '', $record['loc']);
$i++;
$record['type'] = 'lc_connector';
$record['subtype'] = '';
$record['id'] = $i;
if (isset($hash[$record['changefreq']])) {
$record['changefreq'] = $hash[$record['changefreq']];
} else {
unset($record['changefreq']);
}
xmlsitemap_link_save($record);
}
}
示例2: buildCleanURL
/**
* Build CleanURL
*
* @param string $target Page identifier
* @param string $action Action to perform OPTIONAL
* @param array $params Additional params OPTIONAL
*
* @return string
*/
protected function buildCleanURL($target, $action = '', array $params = array())
{
return \XLite\Core\Converter::buildDrupalPath($target, $action, $params);
}