public function addCustomLayoutAction() { $customLayout = Object\ClassDefinition\CustomLayout::create(['name' => $this->getParam("name"), 'userOwner' => $this->user->getId(), "classId" => $this->getParam("classId")]); $customLayout->save(); $this->_helper->json(["success" => true, "id" => $customLayout->getId(), "name" => $customLayout->getName(), "data" => $customLayout]); }