//decode the json formatted manifest so we can use the information $presentation = json_decode($contents); $presentation = $presentation->presentation; if (!is_object($presentation)) { $presentation = new stdClass(); $presentation->slides = array(); $presentation->media = array(); $presentation->placeholder = null; $presentation->duration = null; } //get this resource $rr = new \Components\Resources\Tables\Resource($this->database); $rr->load($this->resid); //get the parent resource $rh = new \Components\Resources\Helpers\Helper($this->resid, $this->database); $rh->getParents(); $parent = $rh->parents[0]; //check to see if parent type is series $rt = new \Components\Resources\Tables\Type($this->database); $rt->load($parent->type); //if we have a series get children if ($rt->type == "Series" || $rt->type == "Courses") { $rh->getChildren($parent->id, 0, 'yes'); $children = $rh->children; //remove any children without a HUBpresenter foreach ($children as $k => $c) { $rh = new \Components\Resources\Helpers\Helper($c->id, $this->database); $rh->getChildren(); $sub_child = $rh->children; $hasHUBpresenter = false; foreach ($sub_child as $sc) {