heristop / propel-senchagridable-behavior
自动为Sencha / ExtJS网格添加过滤器的Propel行为
1.0.0
2014-02-06 23:52 UTC
This package is not auto-updated.
Last update: 2024-09-24 01:38:14 UTC
README
安装
在src/中下载SenchagridableBehavior.php文件,将其放在您的项目中某个位置,然后在您的propel.ini中添加以下行
propel.behavior.senchagridable.class = path.to.SenchagridableBehavior
或者使用composer添加以下需求
{ "require": { "heristop/propel-senchagridable-behavior": "*" } }
用法
将此行添加到您的schema.xml中
<behavior name="senchagridable" />
该行为将为Query类添加几个方法
public function paginateGrid($params) public function addGridSortQuery($params) public function addGridFiltersQuery($params)
$params变量包含从请求中检索到的参数
$request = $this->get('request'); $posts = PostQuery::create()->paginateGrid($request->query);