Frontend\Core\Engine\FrontendIcal::__construct PHP Method

__construct() public method

Default constructor
public __construct ( string $title, string $description )
$title string The title for the calendar.
$description string A description for the calendar.
    public function __construct($title, $description)
    {
        $description = FrontendModel::convertToPlainText($description);
        $properties['X-WR-CALNAME;VALUE=TEXT'] = $title;
        $properties['X-WR-CALDESC'] = $description;
        $properties['X-WR-TIMEZONE'] = date_default_timezone_get();
        $this->setProductIdentifier('Fork v' . FORK_VERSION);
        $this->setXProperties($properties);
        $this->setTitle($title);
        $this->setFilename(str_replace('-', '_', CommonUri::getUrl($title)) . '.ics');
    }