Exemplo n.º 1
0
 public function __construct($uid = null, $userId = null)
 {
     // Load site's language file
     EB::loadLanguages();
     // This will call EasyBlog class to construct $config, $doc, $app, $input, $my.
     parent::__construct();
     // Globals
     $this->uid = $uid;
     // The author of this item
     $this->user = EB::user($userId);
     // The acl of the author
     $this->acl = EB::acl($this->user->id);
     // If this is a new post, we want to create a new workbench
     if (!$uid) {
         $this->createNewWorkbench();
     } else {
         $this->load($uid);
     }
     // Set the post object to the router so that they can easily retrieve it.
     EBR::setPost($this);
 }