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


PHP Crud::pagination方法代码示例

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


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

示例1: select

 public function select()
 {
     $pagination = $this->_config['pagination'];
     $search = $this->_config['search'];
     $whereList = '';
     if (ake('whereList', $this->_config)) {
         $whereList = $this->_config['whereList'];
     }
     $order = !strlen($this->_request->getCrudOrder()) ? $this->_config['defaultOrder'] : $this->_request->getCrudOrder();
     $orderDirection = !strlen($this->_request->getCrudOrderDirection()) ? $this->_config['defaultOrderDirection'] : $this->_request->getCrudOrderDirection();
     $export = !strlen($this->_request->getCrudTypeExport()) ? null : $this->_request->getCrudTypeExport();
     $offset = !strlen($this->_request->getCrudNumPage()) ? 0 : $this->_request->getCrudNumPage() * $this->_config['itemsByPage'];
     $limit = $this->_config['itemsByPage'];
     $where = !strlen($this->_request->getCrudWhere()) ? '' : Project::makeQuery($this->_request->getCrudWhere(), $this->_type);
     $data = Project::query($this->_type, $where, 0, 0, $order, $orderDirection);
     $count = count($data);
     if (true === $pagination) {
         $pageNumber = $offset / $limit < 1 ? 1 : $offset / $limit;
         $paginator = Paginator::make($data, $count, $limit);
         $this->_items = $paginator->getItemsByPage($pageNumber);
         $this->_pagination = Crud::pagination($paginator);
     } else {
         $this->_items = $data;
     }
     if (0 < $count && null !== $export) {
         $method = 'export' . ucfirst(Inflector::lower($export));
         return Crud::$method($data, $this->_em);
     }
     if (true === $search) {
         $this->makeSearch();
     }
     return $this;
 }
开发者ID:schpill,项目名称:thin,代码行数:33,代码来源:Listing.php

示例2:

    echo _SPPATH;
    echo $webClass;
    ?>
/<?php 
    echo $c;
    ?>
?cmd=edit&id=<?php 
    echo $obj->{$main_id};
    ?>
&parent_page=' + window.selected_page, 'fade');
                });
            </script>
        <?php 
}
?>

    </table>
</div>
<div class="row hidden-print">
    <div class="col-md-12">
        <?php 
Crud::pagination($arr, $webClass);
?>
    </div>
</div>
<?php 
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
开发者ID:CapsuleCorpIndonesia,项目名称:biji_katak,代码行数:31,代码来源:read.php

示例3: bankDiscountModel


//.........这里部分代码省略.........
                if ($colom == "removeAutoCrudClick") {
                    continue;
                }
                ?>
                <th id="sort_<?php 
                echo $colom;
                echo $t;
                ?>
"><?php 
                echo Lang::t($colom);
                ?>
</th>

                <?php 
                Crud::sortBy($arr, $webClass, "sort_" . $colom . $t, $colom);
            }
        }
        ?>
        </tr>

        <?php 
        foreach ($objs as $num => $obj) {
            ?>
            <tr id="<?php 
            echo $c;
            ?>
_<?php 
            echo $obj->{$main_id};
            ?>
">

                <?php 
            foreach ($obj as $colom => $isi) {
                if ($colom == "removeAutoCrudClick") {
                    continue;
                }
                ?>
                    <td id="<?php 
                echo $colom;
                ?>
_<?php 
                echo $obj->{$main_id};
                ?>
">
                        <?php 
                echo stripslashes($isi);
                ?>
                    </td>
                    <?php 
                if (!in_array($colom, $obj->removeAutoCrudClick)) {
                    ?>
                    <script type="text/javascript">
                        $("#<?php 
                    echo $colom;
                    ?>
_<?php 
                    echo $obj->{$main_id};
                    ?>
").click(function () {
                            openLw('<?php 
                    echo $webClass;
                    ?>
View', '<?php 
                    echo _SPPATH;
                    echo $webClass;
                    ?>
/<?php 
                    echo $c;
                    ?>
?cmd=edit&id=<?php 
                    echo $obj->{$main_id};
                    ?>
&parent_page=' + window.selected_page+'&loadagain='+$.now(), 'fade');
                        });
                    </script>
                    <?php 
                }
                ?>
                <?php 
            }
            ?>
            </tr>


        <?php 
        }
        ?>

    </table>
</div>
<div class="row hidden-print">
    <div class="col-md-12">
        <?php 
        Crud::pagination($arr, $webClass);
        ?>
    </div>
</div>
<?php 
        //        pr($mps);
    }
开发者ID:CapsuleCorpIndonesia,项目名称:martabak_revolution,代码行数:101,代码来源:BankDiscount.php


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