本文整理汇总了PHP中EasyBlogRouter::getRoutedUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP EasyBlogRouter::getRoutedUrl方法的具体用法?PHP EasyBlogRouter::getRoutedUrl怎么用?PHP EasyBlogRouter::getRoutedUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EasyBlogRouter
的用法示例。
在下文中一共展示了EasyBlogRouter::getRoutedUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tmpl = null)
{
$config = EasyBlogHelper::getConfig();
$id = JRequest::getCmd('id', '0');
$category = EasyBlogHelper::getTable('Category', 'Table');
$category->load($id);
// private category shouldn't allow to access.
$privacy = $category->checkPrivacy();
if (!$privacy->allowed) {
return;
}
$catIds = array();
$catIds[] = $category->id;
EasyBlogHelper::accessNestedCategoriesId($category, $catIds);
$model = $this->getModel('Blog');
$posts = $model->getBlogsBy('category', $catIds);
$weever = EasyBlogHelper::getHelper('Weever')->getMainFeed();
$weever->set('description', JText::sprintf('COM_EASYBLOG_FEEDS_CATEGORY_DESC', $this->escape($category->title)));
$weever->set('url', EasyBlogRouter::getRoutedUrl('index.php?option=com_easyblog&view=categories&id=' . $id . '&format=weever', false, true));
$weever->set('thisPage', 1);
$weever->set('lastPage', 1);
if ($posts) {
foreach ($posts as $post) {
$blog = EasyBlogHelper::getTable('Blog');
$blog->load($post->id);
$weever->addChild($blog);
}
}
$weever->toJSON(true, JRequest::getVar('callback'));
}
示例2: getWeeverURL
public function getWeeverURL($url)
{
require_once EBLOG_HELPERS . DIRECTORY_SEPARATOR . 'router.php';
$sef = EasyBlogRouter::isSefEnabled();
$join = $sef ? '?' : '&';
$url = EasyBlogRouter::getRoutedUrl($url, false, true) . $join . 'format=weever';
return $url;
}