コード例 #1
0
ファイル: ical.php プロジェクト: naujasdizainas/forkcms
 /**
  * Default constructor.
  *
  * @param string $title The title for the item.
  * @param string $link The link for the item.
  * @param string $description The content for the item.
  */
 public function __construct($title, $link, $description)
 {
     // set UTM-campaign
     $this->utm['utm_campaign'] = SpoonFilter::urlise($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);
 }