getName() public method

public getName ( ) : string
return string
 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()));
 }
Beispiel #2
0
 public function videoThumbnailAddAction()
 {
     $this->checkPermission("thumbnails");
     $success = false;
     $pipe = Asset\Video\Thumbnail\Config::getByName($this->getParam("name"));
     if (!$pipe) {
         $pipe = new Asset\Video\Thumbnail\Config();
         $pipe->setName($this->getParam("name"));
         $pipe->save();
         $success = true;
     }
     $this->_helper->json(["success" => $success, "id" => $pipe->getName()]);
 }