当前位置: 首页>>代码示例>>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;未经允许,请勿转载。