adapter = $adapter; } /** * Sets the reason * * @param string $reason */ public function setReason($reason) { $this->reason = $reason; } /** * {@inheritdoc} */ public function getSubject() { return sprintf( _('Upload failed on %s'), $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 sprintf( _('An upload on %s failed, the resaon is : %s'), $this->adapter, $this->reason ); } /** * {@inheritdoc} */ public function getButtonText() { } /** * {@inheritdoc} */ public function getButtonURL() { } }