2017 © Pedro Peláez
 

yii2-extension yii2-masonry

Masonry Yii2 Extension width infinitescroll

image

shiyang/yii2-masonry

Masonry Yii2 Extension width infinitescroll

  • Saturday, May 2, 2015
  • by Shiyang
  • Repository
  • 1 Watchers
  • 2 Stars
  • 362 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

yii2-masonry

Masonry Yii2 Extension width infinitescroll, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist shiyang/yii2-masonry "*"

or add, (*4)

"shiyang/yii2-masonry": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

Controller action:, (*7)

function actionIndex()
{
    $query = Article::find()->where(['status' => 1]);
    $countQuery = clone $query;
    $pages = new Pagination(['totalCount' => $countQuery->count()]);
    $models = $query->offset($pages->offset)
        ->limit($pages->limit)
        ->all();

    return $this->render('index', [
         'models' => $models,
         'pages' => $pages,
    ]);
}

View:, (*8)

\shiyang\masonry\Masonry::begin([
        'options' => [
          'id' => 'models'
        ],
        'pagination' => $pages
    ]);
    foreach ($models as $model) {
        // display $model here
    }
\shiyang\masonry\Masonry::end();

The Versions

02/05 2015

dev-master

9999999-dev

Masonry Yii2 Extension width infinitescroll

  Sources   Download

MIT

The Requires

 

by Avatar Shiyang

extension yii2 masonry infinitescroll

02/05 2015

v1.0.1

1.0.1.0

Masonry Yii2 Extension width infinitescroll

  Sources   Download

MIT

The Requires

 

by Avatar Shiyang

extension yii2 masonry infinitescroll

02/05 2015

v1.0

1.0.0.0

Masonry Yii2 Extension width infinitescroll

  Sources   Download

MIT

The Requires

 

by Avatar Shiyang

extension yii2 masonry infinitescroll