Exemple #1
0
 public function getAllParameters()
 {
     if ($this->_parameters) {
         return $this->_parameters;
     }
     if ($this->id) {
         $id = $this->id;
     } else {
         $id = 0;
     }
     $this->_parameters = ParametersValues::find()->select('*')->rightJoin(Parameters::tableName() . ' as a', ParametersValues::tableName() . '.`param_id` = `a`.`id` AND ' . ParametersValues::tableName() . '.product_id = ' . (int) $id)->where(['a.status' => Parameters::STATUS_ACTIVE])->groupBy(['id'])->orderBy('order')->all();
     return $this->_parameters;
 }