| @@ 9-28 (lines=20) @@ | ||
| 6 | ||
| 7 | class LinkController extends CrudController { |
|
| 8 | ||
| 9 | public function all($entity) { |
|
| 10 | ||
| 11 | parent::all($entity); |
|
| 12 | ||
| 13 | $this->filter = \DataFilter::source(new Link()); |
|
| 14 | $this->filter->add('id', 'ID', 'text'); |
|
| 15 | $this->filter->add('display', 'Display', 'text'); |
|
| 16 | $this->filter->submit('search'); |
|
| 17 | $this->filter->reset('reset'); |
|
| 18 | $this->filter->build(); |
|
| 19 | ||
| 20 | $this->grid = \DataGrid::source($this->filter); |
|
| 21 | $this->grid->add('id', 'ID', true)->style("width:100px"); |
|
| 22 | $this->grid->add('display', 'Display'); |
|
| 23 | $this->grid->add('url', 'Model'); |
|
| 24 | ||
| 25 | $this->addStylesToGrid(); |
|
| 26 | ||
| 27 | return $this->returnView(); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function edit($entity) { |
|
| 31 | ||
| @@ 14-31 (lines=18) @@ | ||
| 11 | class UsersController extends Controller{ |
|
| 12 | ||
| 13 | ||
| 14 | public function all($entity){ |
|
| 15 | ||
| 16 | parent::all($entity); |
|
| 17 | ||
| 18 | $this->filter = \DataFilter::source(new \User()); |
|
| 19 | $this->filter->add('id', 'ID', 'text'); |
|
| 20 | $this->filter->add('name', 'Name', 'text'); |
|
| 21 | $this->filter->submit('search'); |
|
| 22 | $this->filter->reset('reset'); |
|
| 23 | $this->filter->build(); |
|
| 24 | ||
| 25 | $this->grid = \DataGrid::source($this->filter); |
|
| 26 | $this->grid->add('id','ID', true)->style("width:100px"); |
|
| 27 | $this->grid->add('name','Name'); |
|
| 28 | $this->addStylesToGrid(); |
|
| 29 | ||
| 30 | return $this->returnView(); |
|
| 31 | } |
|
| 32 | ||
| 33 | ||
| 34 | ||
| @@ 9-28 (lines=20) @@ | ||
| 6 | ||
| 7 | class PermissionController extends CrudController { |
|
| 8 | ||
| 9 | public function all($entity) { |
|
| 10 | ||
| 11 | parent::all($entity); |
|
| 12 | ||
| 13 | $this->filter = \DataFilter::source(new Permission()); |
|
| 14 | $this->filter->add('id', 'ID', 'text'); |
|
| 15 | $this->filter->add('name', 'Name', 'text'); |
|
| 16 | $this->filter->submit('search'); |
|
| 17 | $this->filter->reset('reset'); |
|
| 18 | $this->filter->build(); |
|
| 19 | ||
| 20 | $this->grid = \DataGrid::source($this->filter); |
|
| 21 | $this->grid->add('id', 'ID', true)->style("width:100px"); |
|
| 22 | $this->grid->add('name', 'Url')->style('width:100px'); |
|
| 23 | $this->grid->add('label', 'Description'); |
|
| 24 | ||
| 25 | $this->addStylesToGrid(); |
|
| 26 | ||
| 27 | return $this->returnView(); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function edit($entity) { |
|
| 31 | ||