當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。