Source for: 'library/MkohZf/View/Helper/ImageUrl.php'
<?php
class MkohZf_View_Helper_ImageUrl
{
private $view;
public function setView($view)
{
$this->view = $view;
}
public function imageUrl($path, $resizetype = 'thumb', Array $options = Array())
{
try {
$image = new MkohZf_Image(
ROOT_PATH.'/data/images_original',
ROOT_PATH.'/html/images_cached'
);
// @todo: include lightbox js here instead of main tpl
$path = $image->getResized($path, $resizetype);
$path = $this->view->baseUrl().'/images_cached'.DIRECTORY_SEPARATOR.$path;
return $path;
} catch(MkohZf_Exception $e) {
return '';
}
}
}
Comments
No comments, why not write one?