Пример #1
0
 /**
  * This function sets and returns a new path for a requested content entity.
  * @param string $filename = the original fileName from which the extension is cut.
  * @return string the content file name
  */
 public function setThumbnail($filename, $force = false)
 {
     if ($force) {
         $data = $filename;
     } else {
         $data = myContentStorage::generateRandomFileName($filename, $this->getThumbnail());
     }
     $this->onAssetContentModified();
     parent::setThumbnail($data);
     return $this->getThumbnail();
 }