コード例 #1
0
 /**
  * Generates asset thumbnails.
  *
  * @return bool, false if thumbnails are not supported.
  */
 public function generateThumbnails()
 {
     if (!$this->supportsThumbnails()) {
         return false;
     }
     $tn = new lyMediaThumbnails($this->getFolderPath(), $this->getFilename());
     $tn->generate();
     return true;
 }
コード例 #2
0
 /**
  * Generates asset thumbnails.
  *
  * @return bool, false if thumbnails are not supported.
  */
 public function generateThumbnails()
 {
     if (!$this->supportsThumbnails()) {
         return false;
     }
     $tn = new lyMediaThumbnails($this->getPath(), in_array($this->getType(), array('image/png', 'image/gif')) ? $this->getType() : 'image/jpeg', $this->getThumbnailFile(null));
     $tn->generate();
     return true;
 }