/** * List media files in the media dir * @return Array - array of file objects */ function listMedia() { $icfConfig = new IcfConfig(); $objectMapper = new ObjectMapper(); $objectArray = $objectMapper->findByClassId($icfConfig->cfg_media_class_id); return $this->listFiles($objectArray, "MEDIA", $icfConfig->cfg_site_mediaPathFs); }
/** * Gets the objects associated to this class. Be careful with this method, you * should only use it if the number of objects is minimmum. * @return Array - instances of Object class */ function getObjects() { if (is_null($this->objects)) { $objectMapper = new ObjectMapper(); $this->objects = $objectMapper->findByClassId($this->getId(), true); } return $this->objects; }