Pimcore\Model\Object\KeyValue\KeyConfig::setType PHP Method

setType() public method

public setType ( $type )
$type
    public function setType($type)
    {
        $this->type = $type;
        return $this;
    }

Usage Example

Ejemplo n.º 1
0
 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()]);
 }
All Usage Examples Of Pimcore\Model\Object\KeyValue\KeyConfig::setType