public function rows($id, $build_id) { $config = Grids::make($id)->toRowDatasetConfig($id); $filters = $config['source']->custom_filters(); $config['source']->custom_filters($filters + ['test' => 'counters.build_id = ' . $build_id]); return $this->dataset($config); }
public function rows($id, $type = NULL) { $config = Grids::make($id)->toRowDatasetConfig($id); $filters = $config['source']->custom_filters(); // $config['source']->custom_filters( $filters + [ 'test' => 'buildings.institution_id = 1' ] ); return $this->dataset($config); }
public function rows($id) { $organization_id = \Session::get('user_organization'); $config = Grids::make($id)->toRowDatasetConfig($id); $filters = $config['source']->custom_filters(); $type_client = $organization_id ? ['organization_id' => 'buildings.organization_id = ' . $organization_id] : []; $config['source']->custom_filters($filters + $type_client); return $this->dataset($config); }
public function rows($id, $vehicle_id) { if (!($vehicle = Vehicle::find($vehicle_id))) { return $this->try_($vehicle); } $config = Grids::make($id)->toRowDatasetConfig($id); $filters = $config['source']->custom_filters(); $config['source']->custom_filters($filters + ['test' => 'consumptions.vehicle_id = ' . $vehicle_id]); return $this->dataset($config); }
public function rows($id, $counter_id) { if (!($counter = Counter::find($counter_id))) { return $this->try_($counter); } $config = Grids::make($id)->toRowDatasetConfig($id); $filters = $config['source']->custom_filters(); $config['source']->custom_filters($filters + ['test' => 'bills.counter_id = ' . $counter_id]); return $this->dataset($config); }
public function rows($id, $institution_id) { if (!($institution = Institution::find($institution_id))) { return $this->try_($institution); } $config = Grids::make($id)->toRowDatasetConfig($id); $filters = $config['source']->custom_filters(); $config['source']->custom_filters($filters + ['test' => 'buildings.institution_id = ' . $institution_id]); return $this->dataset($config); }
public function rows($id, $type = NULL) { $organization_id = \Session::get('user_organization'); $config = Grids::make($id)->toRowDatasetConfig($id); $filters = $config['source']->custom_filters(); $type_organization = $organization_id ? ['organization_id' => 'institutions.organization_id = ' . $organization_id] : []; $type_client = $type ? ['tip_client' => 'institutions.category_id = ' . $type] : []; $allowed_organizations = $this->getUserOrganizationsIds(); $user_organizations = $type ? ['user_organizations' => 'institutions.organization_id in ' . $allowed_organizations] : []; $config['source']->custom_filters($filters + $type_client + $type_organization + $user_organizations); return $this->dataset($config); }
public function rows($id) { $config = Grids::make($id)->toRowDatasetConfig($id); return $this->dataset($config); }
/** * @param $id * @return mixed */ public function rows($id) { return $this->dataset(Grids::make($id)->toRowDatasetConfig($id)); }