getRecord (); $this->setVisibleName ($record->description); } function getScreenshots () { $result = array (); $table_prefix = $this->getRecord ()->getTablePrefix (); $query = <<getRecord (); $set = $record->query ($query, $this->getId (), $this->getTemplateId ()); foreach ($set as $record) { $preview = new Theme_Preview (); $preview->setBaseUrl ($this->getScreenshotLocation ()); $preview->setMacrophage (new Theme_Macrophage ()); $preview->setRecord (ORM::factory ('screenshot', $record->id)); $result [] = $preview; } return $result; } public function getSeoName () { return preg_replace ('/[^0-9a-z]+/i', '-', $this->getVisibleName ()); } function setVisibleName ($description) { $this->description = $description; } function getVisibleName () { return $this->description; } function setUrl ($url) { $this->url = $url; } function getUrl () { $macro = $this->getMacrophage (); $macro->addMacro ('PAGE-NAME', $this->getSeoName ()); return url::href ('/' . $macro->run ($this->url)); } function setTemplateId ($template_id) { $this->template_id = $template_id; } function getTemplateId () { return $this->template_id; } function setScreenshotLocation ($screenshot_location) { $this->screenshot_location = $screenshot_location; } function getScreenshotLocation () { return $this->screenshot_location; } }