/** * Returns a list of scenarios and the corresponding active attributes. * Add the 'createBasic' and 'addComponents' scenario and update 'update' scenario * @return array a list of scenarios and the corresponding active attributes. */ public function scenarios() { $scenarios = parent::scenarios(); $scenarios[self::SCENARIO_CREATE] = ['productId', 'code']; return $scenarios; }