public function __construct($data = array())
 {
     parent::__construct();
     $this->entityType = 'bundle';
     if (!empty($data['id'])) {
         $CMS = new CMS();
         $this->id = $data['id'];
         $this->populate_object($CMS->get_entity_data($this));
     }
     $this->populate_object($data);
 }
 public function __construct($data = array())
 {
     parent::__construct();
     $this->entityType = 'article';
     if (!empty($data['id'])) {
         $CMS = new CMS();
         $this->id = $data['id'];
         $this->populate_object($CMS->get_entity_data($this));
     }
     $this->populate_object($data);
     if (empty($this->template)) {
         $templates = new Templates();
         $defaultTemplate = $templates->get_default();
         $this->template = $defaultTemplate['path'];
     }
 }
 public function refresh($overrides = array(), $from_cloud = false)
 {
     if ($from_cloud) {
         $adobe = new Adobe();
         $adobe->get_entity($this);
     } else {
         $CMS = new CMS();
         $data = $CMS->get_entity_data($this);
         $this->populate_object($data);
     }
     $this->populate_object($overrides);
 }