@@ -34,8 +34,8 @@ |
||
| 34 | 34 | |
| 35 | 35 | $this->setAdapter($adapter); |
| 36 | 36 | $this->setDefaultLimit(15); |
| 37 | - $this->setAllowOrders(['name', 'id', 'status']); |
|
| 38 | - $this->setAllowFilters(['status', 'id']); |
|
| 37 | + $this->setAllowOrders([ 'name', 'id', 'status' ]); |
|
| 38 | + $this->setAllowFilters([ 'status', 'id' ]); |
|
| 39 | 39 | $this->setDefaultOrder('name', Grid::ORDER_DESC); |
| 40 | 40 | |
| 41 | 41 | return $this; |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | |
| 39 | 39 | $this->setAdapter($adapter); |
| 40 | 40 | $this->setDefaultLimit(15); |
| 41 | - $this->setAllowOrders(['name', 'id', 'status']); |
|
| 42 | - $this->setAllowFilters(['status', 'id']); |
|
| 41 | + $this->setAllowOrders([ 'name', 'id', 'status' ]); |
|
| 42 | + $this->setAllowFilters([ 'status', 'id' ]); |
|
| 43 | 43 | |
| 44 | 44 | return $this; |
| 45 | 45 | } |
@@ -32,23 +32,23 @@ |
||
| 32 | 32 | $adapter = new \Bluz\Grid\Source\ArraySource(); |
| 33 | 33 | $adapter->setSource( |
| 34 | 34 | [ |
| 35 | - ['id' => 1, 'name' => 'Foo', 'email' => '[email protected]', 'status' => 'active'], |
|
| 36 | - ['id' => 2, 'name' => 'Bar', 'email' => '[email protected]', 'status' => 'active'], |
|
| 37 | - ['id' => 3, 'name' => 'Foo 2', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 38 | - ['id' => 4, 'name' => 'Foo 3', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 39 | - ['id' => 5, 'name' => 'Foo 4', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 40 | - ['id' => 6, 'name' => 'Foo 5', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 41 | - ['id' => 7, 'name' => 'Foo 6', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 42 | - ['id' => 8, 'name' => 'Foo 7', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 43 | - ['id' => 9, 'name' => 'Foo 8', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 44 | - ['id' => 10, 'name' => 'Foo 9', 'email' => '[email protected]', 'status' => 'disable'], |
|
| 35 | + [ 'id' => 1, 'name' => 'Foo', 'email' => '[email protected]', 'status' => 'active' ], |
|
| 36 | + [ 'id' => 2, 'name' => 'Bar', 'email' => '[email protected]', 'status' => 'active' ], |
|
| 37 | + [ 'id' => 3, 'name' => 'Foo 2', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 38 | + [ 'id' => 4, 'name' => 'Foo 3', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 39 | + [ 'id' => 5, 'name' => 'Foo 4', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 40 | + [ 'id' => 6, 'name' => 'Foo 5', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 41 | + [ 'id' => 7, 'name' => 'Foo 6', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 42 | + [ 'id' => 8, 'name' => 'Foo 7', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 43 | + [ 'id' => 9, 'name' => 'Foo 8', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 44 | + [ 'id' => 10, 'name' => 'Foo 9', 'email' => '[email protected]', 'status' => 'disable' ], |
|
| 45 | 45 | ] |
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | 48 | $this->setAdapter($adapter); |
| 49 | 49 | $this->setDefaultLimit(3); |
| 50 | - $this->setAllowOrders(['name', 'email', 'id']); |
|
| 51 | - $this->setAllowFilters(['name', 'status', 'id']); |
|
| 50 | + $this->setAllowOrders([ 'name', 'email', 'id' ]); |
|
| 51 | + $this->setAllowFilters([ 'name', 'status', 'id' ]); |
|
| 52 | 52 | |
| 53 | 53 | return $this; |
| 54 | 54 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function saveTestRow() |
| 44 | 44 | { |
| 45 | - return $this->insert(['name' => 'Example #' . rand(1, 10), 'email' => '[email protected]']); |
|
| 45 | + return $this->insert([ 'name' => 'Example #'.rand(1, 10), 'email' => '[email protected]' ]); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function updateTestRows() |
| 54 | 54 | { |
| 55 | - return $this->update(['email' => '[email protected]'], ['email' => '[email protected]']); |
|
| 55 | + return $this->update([ 'email' => '[email protected]' ], [ 'email' => '[email protected]' ]); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -62,6 +62,6 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function deleteTestRows() |
| 64 | 64 | { |
| 65 | - return $this->delete(['email' => '[email protected]']); |
|
| 65 | + return $this->delete([ 'email' => '[email protected]' ]); |
|
| 66 | 66 | } |
| 67 | 67 | } |
@@ -37,8 +37,8 @@ |
||
| 37 | 37 | |
| 38 | 38 | $this->setAdapter($adapter); |
| 39 | 39 | $this->setDefaultLimit(15); |
| 40 | - $this->setAllowOrders(['name', 'id', 'status']); |
|
| 41 | - $this->setAllowFilters(['status', 'id']); |
|
| 40 | + $this->setAllowOrders([ 'name', 'id', 'status' ]); |
|
| 41 | + $this->setAllowFilters([ 'status', 'id' ]); |
|
| 42 | 42 | |
| 43 | 43 | return $this; |
| 44 | 44 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * |
| 19 | 19 | * @return void |
| 20 | 20 | */ |
| 21 | -return function () { |
|
| 21 | +return function() { |
|
| 22 | 22 | /** |
| 23 | 23 | * @var Controller $this |
| 24 | 24 | */ |
@@ -16,13 +16,13 @@ |
||
| 16 | 16 | /** |
| 17 | 17 | * @return string |
| 18 | 18 | */ |
| 19 | -return function () { |
|
| 19 | +return function() { |
|
| 20 | 20 | /** |
| 21 | 21 | * @var Controller $this |
| 22 | 22 | */ |
| 23 | 23 | Layout::breadCrumbs( |
| 24 | 24 | [ |
| 25 | - Layout::ahref('Test', ['test', 'index']), |
|
| 25 | + Layout::ahref('Test', [ 'test', 'index' ]), |
|
| 26 | 26 | 'Grid with Select', |
| 27 | 27 | ] |
| 28 | 28 | ); |
@@ -20,20 +20,20 @@ |
||
| 20 | 20 | * @param string $alias |
| 21 | 21 | * @return string |
| 22 | 22 | */ |
| 23 | -return function ($alias) { |
|
| 23 | +return function($alias) { |
|
| 24 | 24 | /** |
| 25 | 25 | * @var Controller $this |
| 26 | 26 | */ |
| 27 | 27 | Layout::breadCrumbs( |
| 28 | 28 | [ |
| 29 | - Layout::ahref('Test', ['test', 'index']), |
|
| 29 | + Layout::ahref('Test', [ 'test', 'index' ]), |
|
| 30 | 30 | 'Grid with Select', |
| 31 | 31 | ] |
| 32 | 32 | ); |
| 33 | 33 | $grid = new Test\SelectGrid(); |
| 34 | 34 | $grid->setModule($this->module); |
| 35 | 35 | $grid->setController($this->controller); |
| 36 | - $grid->setParams(['alias'=>$alias]); |
|
| 36 | + $grid->setParams([ 'alias'=>$alias ]); |
|
| 37 | 37 | |
| 38 | 38 | $this->assign('grid', $grid); |
| 39 | 39 | |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | * @param int $a |
| 18 | 18 | * @return void |
| 19 | 19 | */ |
| 20 | -return function ($a = 0) { |
|
| 20 | +return function($a = 0) { |
|
| 21 | 21 | /** |
| 22 | 22 | * @var Controller $this |
| 23 | 23 | */ |
| 24 | - $this->assign('current', 'Time is '. date('H:i:s') . ' and $a = `'. $a .'`'); |
|
| 24 | + $this->assign('current', 'Time is '.date('H:i:s').' and $a = `'.$a.'`'); |
|
| 25 | 25 | }; |