|
|
|
|
|
|
|
|
[['prix', 'poids'], 'number'], |
|
|
[['prix', 'poids'], 'number'], |
|
|
[['illustration','photo'], 'file'], |
|
|
[['illustration','photo'], 'file'], |
|
|
[['nom', 'description', 'illustration', 'photo', 'saison','diminutif'], 'string', 'max' => 255], |
|
|
[['nom', 'description', 'illustration', 'photo', 'saison','diminutif'], 'string', 'max' => 255], |
|
|
[['recette'], 'string','max'=>1000] |
|
|
|
|
|
|
|
|
[['recette'], 'string','max'=>1000], |
|
|
|
|
|
['id_boulangerie','integer'], |
|
|
|
|
|
['id_boulangerie','required'], |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
else |
|
|
return $this->description ; |
|
|
return $this->description ; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function save($runValidation = true, $attributeNames = NULL) |
|
|
|
|
|
{ |
|
|
|
|
|
$this->id_boulangerie = Yii::$app->user->identity->id ; |
|
|
|
|
|
return parent::save($runValidation, $attributeNames) ; |
|
|
|
|
|
} |
|
|
} |
|
|
} |