public function ICalendarEvent::__construct in Opigno calendar event 8
Same name and namespace in other branches
- 3.x src/iCal/ICalendarEvent.php \Drupal\opigno_calendar_event\iCal\ICalendarEvent::__construct()
ICalendarEvent constructor.
File
- src/
iCal/ ICalendarEvent.php, line 50
Class
- ICalendarEvent
- Class ICalendarEvent.
Namespace
Drupal\opigno_calendar_event\iCalCode
public function __construct($parameters) {
$parameters += [
'summary' => 'Untitled Event',
'description' => '',
'url' => '',
'org' => '',
'location' => '',
];
if (isset($parameters['uid'])) {
$this->uid = $parameters['uid'];
}
else {
$this->uid = uniqid(rand(0, getmypid()));
}
$this->start = $parameters['start'];
$this->end = $parameters['end'];
$this->summary = $parameters['summary'];
$this->description = $parameters['description'];
$this->url = $parameters['url'];
$this->org = $parameters['org'];
$this->location = $parameters['location'];
return $this;
}