Pimcore\Model\Object\KeyValue\KeyConfig::getName PHP Méthode

getName() public méthode

public getName ( ) : string
Résultat string
    public function getName()
    {
        return $this->name;
    }

Usage Example

 public function addpropertyAction()
 {
     $name = $this->getParam("name");
     $alreadyExist = false;
     if (!$alreadyExist) {
         $config = new KeyValue\KeyConfig();
         $config->setName($name);
         $config->setType("text");
         $config->save();
     }
     $this->_helper->json(["success" => !$alreadyExist, "id" => $config->getName()]);
 }