Pimcore\Model\Asset\Video\Thumbnail\Config::setName PHP Method

setName() public method

public setName ( $name )
$name
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 public function videoThumbnailAddAction()
 {
     $this->checkPermission("thumbnails");
     $alreadyExist = false;
     try {
         Asset\Video\Thumbnail\Config::getByName($this->getParam("name"));
         $alreadyExist = true;
     } catch (\Exception $e) {
         $alreadyExist = false;
     }
     if (!$alreadyExist) {
         $pipe = new Asset\Video\Thumbnail\Config();
         $pipe->setName($this->getParam("name"));
         $pipe->save();
     }
     $this->_helper->json(array("success" => !$alreadyExist, "id" => $pipe->getName()));
 }
All Usage Examples Of Pimcore\Model\Asset\Video\Thumbnail\Config::setName