/** * Load stuff * @return $this */ function load_attachs() { $this->attachs = $this->get_attach_model()->set_where("pid = %d", $this->model->id)->with_deps($this->deps); if ($this->with_ctype && ($ctype = $this->model->get_ctype_id())) { $this->attachs->where('ctype_id', $ctype); } $this->load_attachs_before(); $this->attachs->load(); $this->load_attachs_after(); return $this->attachs; }