Map stacks to VTODO and link them as parent entries
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace OCA\Deck\Db;
|
||||
|
||||
use Sabre\VObject\Component\VCalendar;
|
||||
|
||||
class Stack extends RelationalEntity {
|
||||
protected $title;
|
||||
protected $boardId;
|
||||
@@ -50,4 +52,18 @@ class Stack extends RelationalEntity {
|
||||
}
|
||||
return $json;
|
||||
}
|
||||
|
||||
public function getCalendarObject(): VCalendar {
|
||||
$calendar = new VCalendar();
|
||||
$event = $calendar->createComponent('VTODO');
|
||||
$event->UID = 'deck-stack-' . $this->getId();
|
||||
$event->SUMMARY = '[Stack]: ' . $this->getTitle();
|
||||
$calendar->add($event);
|
||||
return $calendar;
|
||||
}
|
||||
|
||||
public function getCalendarPrefix(): string {
|
||||
return 'stack';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user