本文整理汇总了PHP中UrlHelper::get方法的典型用法代码示例。如果您正苦于以下问题:PHP UrlHelper::get方法的具体用法?PHP UrlHelper::get怎么用?PHP UrlHelper::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UrlHelper
的用法示例。
在下文中一共展示了UrlHelper::get方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: coupleWith
function coupleWith(FormElement $component, $url, $filter_column = null, $empty_value = '')
{
$this->setAttribute('rel', $component->getId());
$this->setAttribute('data-url', UrlHelper::get($url));
$this->filter_column = $filter_column;
$this->related = $component;
$this->empty_value = $empty_value;
}
示例2: link
function link($text, $path, $attributes = array(), $escape = true)
{
$attributes = self::formatAttributes($attributes);
if ($escape) {
$text = self::escape($text);
}
if ($path && $path[0] != '/') {
$path = $this->module . '/' . $path;
}
return "<a href=\"" . UrlHelper::get($path) . "\" {$attributes} >{$text}</a>";
}
示例3: rss_feed
function rss_feed()
{
$this->helper->filter->validate($this->args, array(0 => array('db_in_column' => array('blog', 'blog_id'))));
if (is_null($this->args[0])) {
$this->plugin->Error->goto404();
}
$blog = $this->db->Blog->getBlogInfo($this->args[0]);
$feed = $this->view->getFeed();
$feed->setTitle($blog['name']);
$feed->setLink(UrlHelper::get('/blog/rss_feed'));
$feed->setDescription($blog['description']);
$feeds = $this->db->from('blog_post')->where('blog_id', $this->args[0])->where('status', 'published')->orderby('pub_date', 'desc')->limit(50)->fetchAllRows();
foreach ($feeds as $post) {
$item = $feed->createNewItem();
//Add elements to the feed item
$item->setTitle($post['title']);
$item->setLink(UrlHelper::get('/blog/post/' . $post['url_title']));
$item->setDate($post['pub_date']);
$item->setDescription($post['content']);
//Now add the feed item
$feed->addItem($item);
}
}
示例4: foreach
<th> </th>
<th>Username</th>
<th>Email</th>
</tr>
<?php
$collection = $this->getVar('collection');
foreach ($collection as $item) {
?>
<tr>
<td>
<a href="<?php
UrlHelper::get(array('action' => 'update', 'id' => $item->id));
?>
">Modifica</a>
<span class="require-delete-confirm" data-href="<?php
UrlHelper::get(array('action' => 'delete', 'id' => $item->id));
?>
">Cancella</span>
</td>
<td><?php
echo $item->username;
?>
</td>
<td><?php
echo $item->email;
?>
</td>
</tr>
<?php
}
?>
示例5: setUrl
function setUrl($url)
{
$this->url = UrlHelper::get($url);
}
示例6: getHeadHtml
protected function getHeadHtml()
{
$html = new HtmlHelper($this->context);
$output = '';
foreach ($this->metas as $meta) {
if ($meta['name']) {
$output .= "<meta name=\"{$meta['name']}\" content=\"" . HtmlHelper::escape($meta['content']) . "\" />\r\n";
} elseif ($meta['http-equiv']) {
$output .= "<meta http-equiv=\"{$meta['http-equiv']}\" content=\"" . HtmlHelper::escape($meta['content']) . "\" />\r\n";
}
}
$output .= "<title>" . HtmlHelper::escape($this->title) . "</title>\r\n";
$output .= '<base href="' . UrlHelper::get('/') . '"/>' . "\r\n";
if ($this->favico) {
$output .= '<link rel="icon" type="' . $this->favico[1] . "\" href=\"" . UrlHelper::resource($this->favico[0]) . "\">\r\n";
}
if ($this->description) {
$output .= '<meta name="description" content="' . HtmlHelper::escape($this->description) . "\" />\r\n";
}
if ($this->keywords) {
$output .= '<meta name="keywords" content="' . HtmlHelper::escape($this->keywords) . "\" />\r\n";
}
foreach ($this->feeds as $feed) {
$output .= '<link rel="alternate" type="application/rss+xml" title="RSS" href="' . UrlHelper::get($feed) . "\" />\r\n";
}
foreach ($this->styles as $style) {
$output .= $html->css($style[0], $style[1]) . "\r\n";
}
if ($this->js_library) {
$output .= "<script type=\"text/javascript\" src=\"{$this->js_library}\"></script>\r\n";
$output .= $html->javascript('/' . APPU_PHAXSI . '/' . 'phaxsi-' . PhaxsiConfig::FRAMEWORK_VERSION . (AppConfig::DEBUG_MODE ? '' : '.min') . '.js') . "\r\n";
$output .= HtmlHelper::inlineJavascript("Phaxsi.path = {" . "base: '" . UrlHelper::get('') . "'," . "local: '" . UrlHelper::localized('/') . "'," . "'public': '" . APPU_PUBLIC . "'," . "lang: '" . Lang::getCurrent() . "'}");
}
foreach ($this->scripts as $script) {
$output .= $html->javascript($script) . "\r\n";
}
$this->styles = $this->scripts = array();
return $output;
}
示例7: setAjaxAction
final function setAjaxAction($action, $update_element_id, $wait_function = 'null', $success_function = 'null')
{
$action = UrlHelper::get($action);
$this->_javascript .= HtmlHelper::inlineJavascript("Event.on('{$this->_id}', 'submit', Phaxsi.Form.submit.createDelegate(this, ['{$this->_id}','{$action}', '{$update_element_id}', {$wait_function}, {$success_function}], true));");
}
示例8: __construct
function __construct($initial_value = '', $name = null)
{
parent::__construct('textarea', $initial_value, $name, true);
$this->setValidator(array());
$this->config = array('mode' => 'exact', 'elements' => $this->getId(), 'theme' => 'advanced', 'theme_advanced_buttons1' => 'bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,markettoimages,media,separator,bullist,formatselect,forecolor,backcolor,emotions,code', 'theme_advanced_buttons2' => '', 'theme_advanced_buttons3' => '', 'relative_urls' => false, 'height' => '250', 'verify_html' => true, 'cleanup' => true, 'document_base_url' => UrlHelper::get('/'), 'plugins' => 'advimage,media,emotions,paste', 'content_css' => UrlHelper::resource('/phaxsi/extensions/tinycss.css'), 'theme_advanced_statusbar_location' => 'bottom', 'theme_advanced_resizing' => true, 'theme_advanced_resize_horizontal' => false, 'theme_advanced_toolbar_location' => 'top');
}