Esempio n. 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;
 }
Esempio n. 2
0
File: File.php Progetto: vetoni/toko
 /**
  * @return FileModule
  */
 public function getModule()
 {
     return FileModule::getInstance();
 }
Esempio n. 3
0
 /**
  * @return string
  */
 public function actionUpload()
 {
     return $this->render('upload', ['maxFileSize' => FileModule::getInstance()->maxFileSize]);
 }