2amigos/yii2-arrayquery-component
最新稳定版本:1.0.3
Composer 安装命令:
composer require 2amigos/yii2-arrayquery-component
包简介
Yii2 component that allows for searching/filtering the elements of an array.
README 文档
README
Allows searching/filtering of an array. This component is very useful when displaying array data in GridViews with an ArrayDataProvider.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require "2amigos/yii2-arrayquery-component" "*"
or add
"2amigos/yii2-arrayquery-component" : "*"
to the require section of your application's composer.json file.
Usage
\\ $models is the array elements to used with ArrayDataProvider
$query = new ArrayQuery($models);
$models = $query
->addCondition('name', '~2amigos')
->addCondition('name', 'cebe/yii2-gravatar', 'or')
->find();
$dataProvider = new ArrayDataProvider([
'allModels' => $models,
'pagination' => [
'pageSize' => 50,
],
'sort' => [
'attributes' => [], // to be specified
],
]);
Testing
$ phpunit
Contributing
Please see CONTRIBUTING for details.
Credits
License
The BSD License (BSD). Please see License File for more information.
Custom Software | Web & Mobile Software Development www.2amigos.us
统计信息
- 总下载量: 379.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 2
- 依赖项目数: 12
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-02-23