Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
95c6d7d6
Commit
95c6d7d6
authored
Mar 04, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web WIP
parent
4fdaab35
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
17 deletions
+18
-17
Pagination.php
framework/web/Pagination.php
+13
-12
Sort.php
framework/web/Sort.php
+5
-5
User.php
framework/web/User.php
+0
-0
No files found.
framework/web/Pagination.php
View file @
95c6d7d6
<?php
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
* @copyright Copyright
© 2008-2011
Yii Software LLC
* @copyright Copyright
(c) 2008
Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace
yii\web
;
/**
*
C
Pagination represents information relevant to pagination.
* Pagination represents information relevant to pagination.
*
* When data needs to be rendered in multiple pages, we can use
C
Pagination to
* When data needs to be rendered in multiple pages, we can use Pagination to
* represent information such as {@link getItemCount total item count},
* {@link getPageSize page size}, {@link getCurrentPage current page}, etc.
* These information can be passed to {@link CBasePager pagers} to render
...
...
@@ -18,11 +19,13 @@
* Example:
*
* Controller action:
* <pre>
* function actionIndex(){
*
* ~~~
* function actionIndex()
* {
* $criteria=new CDbCriteria();
* $count=Article::model()->count($criteria);
* $pages=new
C
Pagination($count);
* $pages=new Pagination($count);
*
* // results per page
* $pages->pageSize=10;
...
...
@@ -34,7 +37,7 @@
* 'pages' => $pages
* ));
* }
*
</pre>
*
~~~
*
* View:
* <pre>
...
...
@@ -59,11 +62,9 @@
* This returns the same value as {@link pageSize}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.web
* @since 1.0
* @since 2.0
*/
class
CPagination
extends
CComponen
t
class
Pagination
extends
\yii\base\Objec
t
{
/**
* The default page size.
...
...
framework/web/Sort.php
View file @
95c6d7d6
<?php
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
* @copyright Copyright
© 2008-2011
Yii Software LLC
* @copyright Copyright
(c) 2008
Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace
yii\web
;
/**
* CSort represents information relevant to sorting.
*
...
...
@@ -41,10 +42,9 @@
* CSort::SORT_DESC for descending order.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.web
* @since 2.0
*/
class
CSort
extends
CComponen
t
class
Sort
extends
\yii\base\Objec
t
{
/**
* Sort ascending
...
...
framework/web/User.php
0 → 100644
View file @
95c6d7d6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment