當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Html::url方法代碼示例

本文整理匯總了PHP中GCore\Helpers\Html::url方法的典型用法代碼示例。如果您正苦於以下問題:PHP Html::url方法的具體用法?PHP Html::url怎麽用?PHP Html::url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GCore\Helpers\Html的用法示例。


在下文中一共展示了Html::url方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: link

 public function link($text, $field, $params = array())
 {
     $drc = $field == $this->active_field ? $this->direction : 'asc';
     $drc_new = strtolower($this->direction) == 'asc' ? 'desc' : 'asc';
     $drc = strtolower($drc);
     if ($field == $this->active_field) {
         $href = r_(\GCore\Libs\Url::buildQuery($this->url, array('act' => $this->action, 'orderfld' => $field, 'orderdrc' => $drc_new)));
         $data = self::build_link_params($text, $params, $drc, true);
     } else {
         $href = r_(\GCore\Libs\Url::buildQuery($this->url, array('act' => $this->action, 'orderfld' => $field, 'orderdrc' => $drc)));
         $data = self::build_link_params($text, $params, $drc, false);
     }
     extract($data);
     $full = \GCore\Helpers\Html::url($text, $href, $params);
     return $full;
 }
開發者ID:ejailesb,項目名稱:repo_empr,代碼行數:16,代碼來源:sorter.php

示例2: paginator_get_number_link

 public function paginator_get_number_link($url, $page, $active = false)
 {
     $class = 'item';
     if ($active) {
         $class .= ' active';
     }
     return '<li class="' . $class . '">' . \GCore\Helpers\Html::url($page, $url, array('class' => '')) . '</li>';
 }
開發者ID:ejailesb,項目名稱:repo_empr,代碼行數:8,代碼來源:bootstrap3.php

示例3: set_cells_data

 public static function set_cells_data($data_rows = array())
 {
     $data_rows = empty($data_rows) ? self::$items : $data_rows;
     self::$cells_rows = $data_rows;
     foreach ($data_rows as $k => $row) {
         $row = (array) $row;
         foreach (self::$columns as $column) {
             $info = !empty(self::$columns_info[$column]) ? self::$columns_info[$column] : array();
             $r_val = $data = \GCore\Libs\Arr::getVal($row, explode(".", $column));
             if (isset($info['function'])) {
                 if (!is_array($info['function'])) {
                     $data = $info['function']($data, $row, $column);
                 } else {
                     if (isset($info['function'][$r_val])) {
                         $data = $info['function'][$r_val]($data, $row, $column);
                     } elseif (isset($info['function']['*'])) {
                         $_fn = $info['function']['*'];
                         $data = $_fn($data, $row, $column);
                     }
                 }
                 //update the record value based on returned function value
                 $r_val = $data;
             }
             if (isset($info['html'])) {
                 if (!is_array($info['html'])) {
                     $data = $info['html'];
                 } else {
                     if (isset($info['html'][$r_val])) {
                         $data = $info['html'][$r_val];
                     } elseif (isset($info['html']['*'])) {
                         $data = $info['html']['*'];
                     }
                 }
             }
             if (isset($info['image'])) {
                 if (!is_array($info['image'])) {
                     $data = $info['image'];
                 } else {
                     if (isset($info['image'][$r_val])) {
                         $data = $info['image'][$r_val];
                     } elseif (isset($info['image']['*'])) {
                         $data = $info['image']['*'];
                     }
                 }
             }
             if (isset($info['link']) and !empty($data)) {
                 if (!is_array($info['link'])) {
                     if (!empty($info['link'])) {
                         $data = \GCore\Helpers\Html::url($data, $info['link']);
                     }
                 } else {
                     if (isset($info['link'][$r_val])) {
                         if (!empty($info['link'][$r_val])) {
                             $data = \GCore\Helpers\Html::url($data, $info['link'][$r_val]);
                         }
                     } elseif (isset($info['link']['*'])) {
                         $data = \GCore\Helpers\Html::url($data, $info['link']['*']);
                     }
                 }
             }
             if (isset($info['field'])) {
                 if (!is_array($info['field'])) {
                     $data = $info['field'];
                 } else {
                     if (isset($info['field'][$r_val])) {
                         $data = $info['field'][$r_val];
                     } elseif (isset($info['field']['*'])) {
                         $data = $info['field']['*'];
                     }
                 }
                 $data = \GCore\Helpers\DataLoader::load($data, $row);
             }
             if (!strlen($data)) {
                 $data = '';
                 //'&nbsp;';
             }
             self::$cells_data[$k][$column] = $data;
         }
     }
 }
開發者ID:ejailesb,項目名稱:repo_empr,代碼行數:80,代碼來源:data_presenter.php

示例4: paginator_get_number_link

 public function paginator_get_number_link($url, $page, $active = false)
 {
     $class = 'item';
     if ($active) {
         $class .= ' active';
     }
     return \GCore\Helpers\Html::url($page, $url, array('class' => $class));
 }
開發者ID:ejailesb,項目名稱:repo_empr,代碼行數:8,代碼來源:semantic1.php

示例5: paginator_get_number_link

 public function paginator_get_number_link($url, $page, $active = false)
 {
     $alt_class = '';
     if ($active) {
         $alt_class = ' button-disabled active-page-number';
     }
     return \GCore\Helpers\Html::url($page, $url, array('class' => 'page-number button-page-number' . $alt_class));
 }
開發者ID:joecacti,項目名稱:diversebuild,代碼行數:8,代碼來源:paginator.php


注:本文中的GCore\Helpers\Html::url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。