Pimcore\Model\Object\Classificationstore\CollectionConfig::setName PHP Method

setName() public method

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

Usage Example

 public function createCollectionAction()
 {
     $name = $this->getParam("name");
     $alreadyExist = false;
     $config = Classificationstore\CollectionConfig::getByName($name);
     if (!$config) {
         $config = new Classificationstore\CollectionConfig();
         $config->setName($name);
         $config->save();
     }
     $this->_helper->json(array("success" => !$alreadyExist, "id" => $config->getName()));
 }