255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Nom', 'reference' => 'Référence', 'date' => 'Date', 'comment' => 'Commentaire', 'id_point_sale' => 'Point de vente', 'id_distribution' => 'Distribution', 'id_user' => 'Utilisateur', 'address' => 'Adresse', 'city' => 'Ville', 'postcode' => 'Code postale', ]; } /* * Relations */ public function getUser() { return $this->hasOne(User::className(), ['id' => 'id_user']); } public function getPointSaleDistribution() { return $this->hasOne(PointSaleDistribution::className(), ['id_point_sale' => 'id_point_sale']) ->andOnCondition(['id_distribution' => 'id_distribution']) ; } public function getOrder() { return $this->hasOne(Order::className(), ['id' => 'id_delivery_note']); } /** * Retourne les options de base nécessaires à la fonction de recherche. * * @return array */ public static function defaultOptionsSearch() { return [ 'with' => [], 'join_with' => ['user', 'pointSaleDistribution', 'order'], 'orderby' => 'date ASC', 'attribute_id_producer' => '' ] ; } }