| | <?php |
| |
|
| | namespace Kanboard\EventBuilder; |
| |
|
| | use Kanboard\Event\ProjectFileEvent; |
| | use Kanboard\Event\GenericEvent; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | class ProjectFileEventBuilder extends BaseEventBuilder |
| | { |
| | protected $fileId = 0; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function withFileId($fileId) |
| | { |
| | $this->fileId = $fileId; |
| | return $this; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function buildEvent() |
| | { |
| | $file = $this->projectFileModel->getById($this->fileId); |
| |
|
| | if (empty($file)) { |
| | $this->logger->debug(__METHOD__.': File not found'); |
| | return null; |
| | } |
| |
|
| | return new ProjectFileEvent(array( |
| | 'file' => $file, |
| | 'project' => $this->projectModel->getById($file['project_id']), |
| | )); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function buildTitleWithAuthor($author, $eventName, array $eventData) |
| | { |
| | return ''; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function buildTitleWithoutAuthor($eventName, array $eventData) |
| | { |
| | return ''; |
| | } |
| | } |
| |
|