示例#1
0
 /**
  * @param $width
  * @param $height
  * @return string
  */
 public function thumb($width, $height)
 {
     /** @var Image $image */
     if (!$this->_image) {
         $this->_image = $this->owner->image ? $this->owner->image->getThumbnail($width, $height) : FileModule::getInstance()->placeholderUrl;
     }
     return $this->_image;
 }
示例#2
0
文件: File.php 项目: vetoni/toko
 /**
  * @return FileModule
  */
 public function getModule()
 {
     return FileModule::getInstance();
 }
示例#3
0
 /**
  * @return string
  */
 public function actionUpload()
 {
     return $this->render('upload', ['maxFileSize' => FileModule::getInstance()->maxFileSize]);
 }