当前位置: 首页>>代码示例>>PHP>>正文


PHP Sh404sefHelperGeneral::buildUrl方法代码示例

本文整理汇总了PHP中Sh404sefHelperGeneral::buildUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Sh404sefHelperGeneral::buildUrl方法的具体用法?PHP Sh404sefHelperGeneral::buildUrl怎么用?PHP Sh404sefHelperGeneral::buildUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sh404sefHelperGeneral的用法示例。


在下文中一共展示了Sh404sefHelperGeneral::buildUrl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getDefaultRedirect

 /**
  * Builds a (non routed) Joomla url according to default values
  * of controller, task, view and layout
  *
  * @param array $userVars optional set of variables to override default vars, or add more to url
  * @return string the target url, not routed
  */
 protected function _getDefaultRedirect($userVars = array())
 {
     // get default values of the controller
     $defaultVars = array('c' => $this->_returnController, 'layout' => $this->_returnLayout, 'view' => $this->_returnView, 'task' => $this->_returnTask);
     // override default vars with user defined vars
     $vars = array_merge($defaultVars, $userVars);
     // strip empty vars
     foreach ($vars as $key => $value) {
         if ($value == '') {
             unset($vars[$key]);
         }
     }
     return Sh404sefHelperGeneral::buildUrl($vars);
 }
开发者ID:sangkasi,项目名称:joomla,代码行数:21,代码来源:basecontroller.php

示例2: makeLink

 /**
  * Builds up an html link using the various parts supplied
  *
  * @param $view a JView object, to be able to escape output text
  * @param $linkData an array of key/value pairs to build up the target links
  * @param $elementData an array holding element data : title, class, rel
  * @param $modal boolean, if true, required stuff to make the link open in modal box is added
  * @param $hasTip boolean, if true, required stuff to turn elementData['title'] into a tooltip is added
  * @param $extra an array holding key/value pairs, will be added as raw attributes to the link
  */
 public static function makeLink($view, $linkData, $elementData, $modal = false, $modalOptions = array(), $hasTip = false, $extra = array())
 {
     // calculate target link
     if ($modal) {
         $linkData['tmpl'] = 'component';
     }
     $url = Sh404sefHelperGeneral::buildUrl($linkData);
     $url = JRoute::_($url);
     // calculate title
     $title = empty($elementData['title']) ? '' : $elementData['title'];
     $title = is_null($view) ? $title : $view->escape($title);
     $attribs = array();
     // calculate class
     $class = empty($elementData['class']) ? '' : $elementData['class'];
     if ($hasTip) {
         $class .= ' ' . $hasTip;
     }
     // store title in attributes array
     if (!empty($title)) {
         $attribs['title'] = $title;
     }
     // store in attributes array
     if (!empty($class)) {
         $attribs['class'] = $class;
     }
     // calculate modal information
     $rel = empty($elementData['rel']) || is_null($view) ? '' : $view->escape($elementData['rel']);
     if ($modal) {
         $modalOptionsString = Sh404sefHelperHtml::makeSqueezeboxOptions($modalOptions);
         $rel .= ' {handler: \'iframe\'' . (empty($modalOptionsString) ? '' : ', ' . $modalOptionsString) . '}';
     }
     // store in attributes array
     if (!empty($rel)) {
         $attribs['rel'] = $rel;
     }
     // any custom attibutes ?
     if (!empty($extra)) {
         foreach ($extra as $key => $value) {
             $attribs[$key] = $value;
         }
     }
     // finish link
     $anchor = empty($elementData['anchor']) ? $title : $elementData['anchor'];
     return JHTML::link($url, $anchor, $attribs);
 }
开发者ID:lautarodragan,项目名称:ideary,代码行数:55,代码来源:html.php

示例3: empty

          <td class="shl-list-shurl">
            <?php 
        echo empty($url->pageid) ? '' : ShlHtmlBs_Helper::badge($this->escape($url->pageid), 'info');
        ?>
          </td>

          <td class="shl-list-sef">
            <?php 
        echo '<input type="hidden" name="metaid[' . $url->id . ']" value="' . (empty($url->metaid) ? 0 : $url->metaid) . '" />';
        echo '<input type="hidden" name="newurls[' . $url->id . ']" value="' . (empty($url->nonsefurl) ? '' : $this->escape($url->nonsefurl)) . '" />';
        // link to full meta edit
        $anchor = empty($url->oldurl) ? '(-)' : $this->escape($url->oldurl);
        $anchor .= '<br/><i>(' . $this->escape($url->nonsefurl) . ')</i>';
        $params = array();
        $linkData = array('c' => 'editurl', 'task' => 'edit', 'view' => 'editurl', 'startOffset' => '1', 'cid[]' => $url->id, 'tmpl' => 'component');
        $targetUrl = Sh404sefHelperGeneral::buildUrl($linkData);
        $displayedUrl = empty($url->oldurl) ? $url->nonsefurl : $url->oldurl;
        $params['linkTitle'] = JText::_('COM_SH404SEF_MODIFY_META_TITLE') . ' ' . $this->escape($displayedUrl);
        $modalTitle = '';
        $params['linkClass'] = 'shl-list-sef';
        $params['linkType'] = 'a';
        $name = '-editurl-' . $url->id;
        echo ShlHtmlModal_helper::modalLink($name, $anchor, $targetUrl, Sh404sefFactory::getPConfig()->windowSizes['editurl']['x'], Sh404sefFactory::getPConfig()->windowSizes['editurl']['y'], $top = 0, $left = 0, $onClose = '', $modalTitle, $params);
        // small preview icon
        $sefConfig =& Sh404sefFactory::getConfig();
        $link = JURI::root() . ltrim($sefConfig->shRewriteStrings[$sefConfig->shRewriteMode], '/') . (empty($url->oldurl) ? $url->nonsefurl : $url->oldurl);
        echo '&nbsp;<a href="' . $this->escape($link) . '" target="_blank" title="' . JText::_('COM_SH404SEF_PREVIEW') . ' ' . $this->escape($url->oldurl) . '">';
        echo '<img src=\'components/com_sh404sef/assets/images/external-black.png\' border=\'0\' alt=\'' . JText::_('COM_SH404SEF_PREVIEW') . '\' />';
        echo '</a>';
        ?>
          </td>
开发者ID:alesconti,项目名称:FF_2015,代码行数:31,代码来源:default_j3.php

示例4: _useAdapterResult

 protected function _useAdapterResult($result)
 {
     // use results : the adapter may have change the suject
     // of this operation, after analyzing incoming data in an import
     // for instance
     if (!empty($result['opSubject'])) {
         $this->_opSubject = $result['opSubject'];
     }
     // redirections results
     $redirectOptions = empty($result['redirectOptions']) ? array() : $result['redirectOptions'];
     if (!empty($result['redirectTo'])) {
         $this->_redirectTo = $this->_getDefaultRedirect($redirectOptions);
     }
     // display results
     if (!empty($result['mainText'])) {
         $this->_mainText = $result['mainText'];
     }
     if (!empty($result['hiddenText'])) {
         $this->_hiddenText = $result['hiddenText'];
     }
     if (!empty($result['setFormEncType'])) {
         $this->_setFormEncType = $result['setFormEncType'];
     }
     if (!empty($result['continue'])) {
         // calculate redirect url to next step
         $vars = array('option' => 'com_sh404sef', 'c' => $this->_defaultController, 'tmpl' => 'component', 'optype' => $this->_opType, 'opsubject' => $this->_opSubject);
         $vars = array_merge($vars, $result['continue']);
         $this->_continue = Sh404sefHelperGeneral::buildUrl($vars);
     }
     if (!empty($result['nextStart'])) {
         $this->_nextStart = $result['nextStart'];
     }
 }
开发者ID:lautarodragan,项目名称:ideary,代码行数:33,代码来源:basewizcontroller.php


注:本文中的Sh404sefHelperGeneral::buildUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。