'Producteur', 'day' => 'Jour de distribution', 'delay_before_distribution' => 'Envoi du message', 'subject' => 'Sujet', 'message' => 'Message', 'integrate_product_list' => 'Intégrer la liste des produits au message', 'status' => 'Statut' ]; } /* Méthodes */ public function isEnabled(): bool { return (bool) $this->getStatus() == StatusInterface::STATUS_ONLINE; } public function getDayAsString(): string { return Date::getDayOfWeekStringByNumber($this->getDay()); } public function getDelayBeforeDistributionAsString(): string { return $this->getDelayBeforeDistribution().' jour(s) avant'; } public function getStatusAsHtml(): string { if($this->getStatus()) { return 'Activé'; } else { return 'Désactivé'; } } /* Getters / Setters */ public function getId(): ?int { return $this->id; } public function getProducer(): Producer { return $this->producerRelation; } public function setProducer(Producer $producer): self { $this->populateFieldObject('id_producer', 'producerRelation', $producer); return $this; } public function getDay(): int { return $this->day; } public function setDay(int $day): self { $this->day = $day; return $this; } public function getDelayBeforeDistribution(): int { return $this->delay_before_distribution; } public function setDelayBeforeDistribution(int $delayBeforeDistribution): self { $this->delay_before_distribution = $delayBeforeDistribution; return $this; } public function getSubject(): string { return $this->subject; } public function setSubject(string $subject): self { $this->subject = $subject; return $this; } public function getMessage(): string { return $this->message; } public function setMessage(string $message): self { $this->message = $message; return $this; } public function getIntegrateProductList(): ?bool { return $this->integrate_product_list; } public function setIntegrateProductList(?bool $integrateProductList): self { $this->integrate_product_list = $integrateProductList; return $this; } public function getStatus(): int { return $this->status; } public function setStatus(int $status): self { $this->status = $status; return $this; } /* Relations */ public function getProducerRelation(): ActiveQuery { return $this->hasOne(Producer::class, ['id' => 'id_producer']); } }