File "userfavourite.class.php"

Full Path: /srv/www/www.cadoro.it/src/models/userfavourite.class.php
File size: 527 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

  namespace models;

  class UserFavourite extends \ArrayObject {

    function __construct($value) {
      parent::__construct($value);
      if ($this['content_type'] == 'blog-article') {
        $this['content'] = BlogArticle::get_by_id($this['content_id']);
        $category = $this['content']->get_category();
        $this['title'] = $this['content']['title'];
        $this['url'] = BASE_URL . "/magazine/" . $category['slug'] . "/" . $this['content']['slug'] . "-" . $this['content']['id'];
      }
    }

  }