Ejemplo n.º 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();
 }
 public function setPicture($filename)
 {
     if (kCurrentContext::isApiV3Context()) {
         parent::setPicture($filename);
         return;
     }
     parent::setPicture(myContentStorage::generateRandomFileName($filename, $this->getPicture()));
 }
Ejemplo n.º 3
0
 public function setPicture($filename)
 {
     if (defined("KALTURA_API_V3")) {
         parent::setPicture($filename);
         return;
     }
     parent::setPicture(myContentStorage::generateRandomFileName($filename, $this->getPicture()));
 }
Ejemplo n.º 4
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.
  * @param string $prop_name = the property name to update in the skinContainer.
  * @param string $$skin_container = should be passed to avoid serializing & deserailizing from $this->getSkin
  * @return string the content file name
  */
 public function setSkinResourceByProperty($filename, $prop_name, skinContainer &$skin_container)
 {
     $skin_container->setByName($prop_name, myContentStorage::generateRandomFileName($filename, $skin_container->getParamFromObject($prop_name)));
     return $skin_container->getParamFromObject($prop_name);
 }
Ejemplo n.º 5
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());
     }
     Baseentry::SetThumbnail($data);
     return $this->getThumbnail();
 }