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()]); }