Item::getRecentThumb PHP 메소드

getRecentThumb() 공개 메소드

得到最近商品缩略图
public getRecentThumb ( ) : type
리턴 type
    public function getRecentThumb()
    {
        $img = $this->getMainPicPath();
        if (file_exists(dirname(F::basePath()) . $img)) {
            $img_thumb = F::baseUrl() . ImageHelper::thumb(210, 210, $img, array('method' => 'resize'));
            $img_thumb_now = CHtml::image($img_thumb, $this->title);
            return CHtml::link($img_thumb_now, array('/item/view', 'id' => $this->item_id), array('title' => $this->title));
        } else {
            return CHtml::link(CHtml::image($this->getHolderJs('210', '210')), $this->getUrl(), array('title' => $this->title));
        }
    }