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

__construct() public method

Default constructor.
public __construct ( string $title, string $link, string $description )
$title string The title for the item.
$link string The link for the item.
$description string The content for the item.
    public function __construct($title, $link, $description)
    {
        // set UTM-campaign
        $this->utm['utm_campaign'] = CommonUri::getUrl($title);
        // convert to plain text
        $description = FrontendModel::convertToPlainText($description);
        // set title
        $this->setSummary($title);
        // set url
        $this->setUrl(FrontendModel::addURLParameters($link, $this->utm));
        // set description
        $this->setDescription($this->processLinks($description));
        // set identifier
        $this->setUniqueIdentifier(md5($link));
        // build properties
        $properties['X-GOOGLE-CALENDAR-CONTENT-TITLE'] = $title;
        $properties['X-GOOGLE-CALENDAR-CONTENT-ICON'] = SITE_URL . '/favicon.ico';
        $properties['X-GOOGLE-CALENDAR-CONTENT-URL'] = $this->getURL();
        // set properties
        $this->setXProperties($properties);
    }