Beispiel #1
0
 /**
  * Set Message Code: content-subscription
  * @return string
  */
 protected function _templateContentSubscription(&$params, &$data)
 {
     # Prepare
     $Locale = Bal_App::getLocale();
     $View = Bal_App::getView(false);
     $Message = $this;
     # Prepare Urls
     $rootUrl = $View->app()->getRootUrl();
     $baseUrl = $View->app()->getBaseUrl(true);
     # --------------------------
     # Prepare
     $Content = $this->Content;
     # Prepare URL
     $contentUrl = $rootUrl . $View->url()->content($Content)->toString();
     $params['Content_url'] = $contentUrl;
     # Send On
     $send_on = strtotime($Content->published_at);
     $this->send_on = doctrine_timestamp($send_on);
     # Adjust Dates
     $params['Message']['Content']['published_at'] = $Locale->date($params['Message']['Content']['published_at']);
     # --------------------------
     return true;
 }
Beispiel #2
0
 public function getUrl()
 {
     # Prepare
     $View = Bal_App::getView();
     # Url
     $url = $View->url()->content($this)->toString();
     # Return url
     return $url;
 }