本文整理汇总了PHP中DispatchManager::get_url方法的典型用法代码示例。如果您正苦于以下问题:PHP DispatchManager::get_url方法的具体用法?PHP DispatchManager::get_url怎么用?PHP DispatchManager::get_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DispatchManager
的用法示例。
在下文中一共展示了DispatchManager::get_url方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_response
private function build_response()
{
$response = new AdminMenuDisplayResponse($this->views);
$response->get_graphical_environment()->set_page_title('Importation');
$response->add_link($this->lang['menu.title'], DispatchManager::get_url('../wpimport', '/admin/import'), 'wpimport.png');
return $response;
}
示例2: get_url
/**
* @param bool $relative If false, compute the absolute url, else, returns the relative one
* @return Return the absolute feed Url
*/
public function get_url($relative = false)
{
$url = DispatchManager::get_url('/syndication', '/rss/' . $this->module_id . '/' . $this->category . '/' . $this->name . '/');
if ($relative) {
return $url->relative();
}
return $url->absolute();
}
示例3: build_response
private function build_response(View $tpl)
{
$title = LangLoader::get_message('configuration', 'admin');
$response = new AdminMenuDisplayResponse($tpl);
$response->set_title($title);
$response->add_link($this->lang['config.title'], DispatchManager::get_url('/QuestionCaptcha', '/admin/config/'));
$env = $response->get_graphical_environment();
$env->set_page_title($title);
return $response;
}
示例4: __construct
public function __construct($view, $title_page)
{
parent::__construct($view);
$lang = LangLoader::get('admin-contents-common');
$this->set_title($lang['comments']);
$this->add_link($lang['comments.config'], DispatchManager::get_url('/admin/content/', '/comments/config/'));
$this->add_link($lang['comments.management'], UserUrlBuilder::comments());
$env = $this->get_graphical_environment();
$env->set_page_title($title_page);
}
示例5: get_feed_data_struct
public function get_feed_data_struct($idcat = 0, $name = '')
{
$config = ForumConfig::load();
$category = ForumService::get_categories_manager()->get_categories_cache()->get_category($idcat);
$data = new FeedData();
$data->set_title(LangLoader::get_message('xml_forum_desc', 'common', 'forum'));
$data->set_date(new Date());
$data->set_link(DispatchManager::get_url('/syndication', '/rss/forum/' . $idcat . '/'));
$data->set_host(HOST);
$data->set_desc(LangLoader::get_message('xml_forum_desc', 'common', 'forum'));
$data->set_lang(LangLoader::get_message('xml_lang', 'main'));
$data->set_auth_bit(Category::READ_AUTHORIZATIONS);
$categories = ForumService::get_categories_manager()->get_childrens($idcat, new SearchCategoryChildrensOptions(), true);
$ids_categories = array_keys($categories);
$results = PersistenceContext::get_querier()->select('SELECT t.id, t.idcat, t.title, t.last_timestamp, t.last_msg_id, t.display_msg, t.nbr_msg AS t_nbr_msg, msg.id mid, msg.contents
FROM ' . PREFIX . 'forum_topics t
LEFT JOIN ' . PREFIX . 'forum_msg msg ON msg.id = t.last_msg_id
WHERE t.idcat IN :ids_categories
ORDER BY t.last_timestamp DESC LIMIT :limit OFFSET 0', array('ids_categories' => $ids_categories, 'limit' => 2 * $config->get_number_messages_per_page()));
foreach ($results as $row) {
$item = new FeedItem();
//Link
$last_page = ceil($row['t_nbr_msg'] / $config->get_number_messages_per_page());
$last_page_rewrite = $last_page > 1 ? '-' . $last_page : '';
$last_page = $last_page > 1 ? 'pt=' . $last_page . '&' : '';
$link = new Url('/forum/topic' . url('.php?' . $last_page . 'id=' . $row['id'], '-' . $row['id'] . $last_page_rewrite . '+' . Url::encode_rewrite($row['title']) . '.php') . '#m' . $row['last_msg_id']);
$item->set_title(($config->is_message_before_topic_title_displayed() && !empty($row['display_msg']) ? TextHelper::html_entity_decode($config->get_message_before_topic_title(), ENT_NOQUOTES) . ' ' : '') . stripslashes($row['title']));
$item->set_link($link);
$item->set_guid($link);
$item->set_desc(FormatingHelper::second_parse($row['contents']));
$item->set_date(new Date($row['last_timestamp'], Timezone::SERVER_TIMEZONE));
$item->set_auth(ForumService::get_categories_manager()->get_heritated_authorizations($row['idcat'], Category::READ_AUTHORIZATIONS, Authorizations::AUTH_PARENT_PRIORITY));
$data->add_item($item);
}
$results->dispose();
return $data;
}
示例6: groups
public static function groups()
{
return DispatchManager::get_url(self::$dispatcher, '/groups/');
}
示例7: home
/**
* @return Url
*/
public static function home()
{
return DispatchManager::get_url(self::$dispatcher, '/');
}
示例8: build_target
private function build_target()
{
$redirect_url = $this->request->get_value('redirect', '/');
$redirect = $redirect_url !== '/' ? '?redirect=' . str_replace('%2F', '/', urlencode($redirect_url)) : '';
if ($this->login_type == self::ADMIN_LOGIN) {
if ($this->redirect !== null && $this->redirect) {
return DispatchManager::get_url($this->redirect, $redirect);
} else {
return DispatchManager::get_url('/admin/admin_index.php', $redirect);
}
}
return DispatchManager::get_url('/user/index.php', '/login' . $redirect);
}
示例9: get_url
/**
* @desc Returns the feed url
* @param string $feed_type The feed type
* @return string the feed url
*/
public function get_url($feed_type = '')
{
$url = DispatchManager::get_url('/syndication', '/rss/' . $this->module_id . '/' . $this->id . '/' . $feed_type . '/');
return $url->relative();
}
示例10: delete_module
public static function delete_module($id = '')
{
return DispatchManager::get_url(self::$dispatcher, '/delete/' . $id);
}
示例11: template
/**
* @return Url
*/
public static function template()
{
return DispatchManager::get_url(self::$dispatcher, '/template');
}
示例12: clear_logged_errors
/**
* @return Url
*/
public static function clear_logged_errors()
{
return DispatchManager::get_url(self::$dispatcher, '/clear/?token=' . AppContext::get_session()->get_token());
}
示例13: delete
/**
* @return Url
*/
public static function delete($id)
{
return DispatchManager::get_url(self::$dispatcher, '/' . $id . '/delete/?token=' . AppContext::get_session()->get_token());
}
示例14: menu_list
/**
* @return Url
*/
public static function menu_list()
{
return DispatchManager::get_url(self::$dispatcher, '/menus/list/');
}
示例15: ajax_refresh
/**
* @return Url
*/
public static function ajax_refresh()
{
return DispatchManager::get_url(self::$dispatcher, '/ajax_refresh/');
}