Esempio n. 1
0
 /**
  * Return the absolute URL type for the node.
  *
  * @param ActiveRecord $record
  * @param string $type The URL type.
  *
  * @return string
  */
 public static function absolute_url(ActiveRecord $record, $type = 'view')
 {
     $app = \ICanBoogie\app();
     try {
         $site = $record->site ? $record->site : $app->site;
     } catch (PropertyNotDefined $e) {
         $site = $app->site;
     }
     return $site->url . substr($record->url($type), strlen($site->path));
 }
Esempio n. 2
0
 public static function get_url(ActiveRecord $record)
 {
     return $record->url();
 }