Example #1
0
 public function preProcess($model, $type, $input)
 {
     $structure = $input->get('structure');
     $structure['product_id'] = (int) array_get($structure, 'product_id');
     $input->put('structure', $structure);
     return parent::preProcess($model, $type, $input);
 }
Example #2
0
 public function preProcess($model, $type, $input)
 {
     $structure = $input->get('structure');
     $structure['per_page'] = (int) array_get($structure, 'per_page');
     $structure['category_ids'] = (array) array_get($structure, 'category_ids');
     $structure['ignore_page'] = (bool) array_get($structure, 'ignore_page');
     $structure['order_by'] = array_get($structure, 'order_by');
     $input->put('structure', $structure);
     return parent::preProcess($model, $type, $input);
 }