Add named parameter filtering to Storage controller
parent
4472269f3c
commit
494be9c0ef
|
@ -33,7 +33,14 @@ class StorageController extends AppController {
|
|||
public function index() {
|
||||
$this->Storage->recursive = -1;
|
||||
|
||||
$options = '';
|
||||
$named_params = $this->request->params['named'];
|
||||
if ( $named_params ) {
|
||||
$this->FilterComponent = $this->Components->load('Filter');
|
||||
$conditions = $this->FilterComponent->buildFilter($named_params);
|
||||
} else {
|
||||
$conditions = array();
|
||||
}
|
||||
$options = ['conditions'=>&$conditions];
|
||||
$storage_areas = $this->Storage->find('all', $options);
|
||||
require_once __DIR__ .'/../../../includes/Storage.php';
|
||||
|
||||
|
|
Loading…
Reference in New Issue