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