Skip to content

Calendar name #380

Answered by akasake
eddir asked this question in Q&A
Discussion options

You must be logged in to vote

So, this is probably not the cleanest way to do it, but I managed to add a calendar display name this way:

After I created a calendar component, I used the function withProperty to "add" the calendar display name property. This will return a clone of your component with the extra property you need.

$calendarComponent = $calendarFactory->createCalendar(
    new Calendar($events)
);

$calendarComponent = $calendarComponent->withProperty(
    new Property('X-WR-CALNAME', new TextValue($ical->getTitle()))
);

if anyone else knows a better way to add the property to the component, please do @ me.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by eddir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants