adapter = $adapter; } /** * Sets the reason * * @param string $reason */ public function setReason($reason) { $this->reason = $reason; } /** * {@inheritdoc} */ public function getSubject() { return $this->app->trans('Upload failed on %application%', ['%application%' => $this->getPhraseanetTitle()]); } /** * {@inheritdoc} */ public function getMessage() { if (null === $this->adapter) { throw new LogicException('You must set an adapter before calling getMessage'); } if (null === $this->reason) { throw new LogicException('You must set a reason before calling getMessage'); } return $this->app->trans('An upload on %bridge_adapter% failed, the resaon is : %reason%', ['%bridge_adapter%' => $this->adapter, '%reason%' => $this->reason]); } /** * {@inheritdoc} */ public function getButtonText() { } /** * {@inheritdoc} */ public function getButtonURL() { } }