public function typePathAction() { $id = $this->getParam("id"); $type = $this->getParam("type"); if ($type == "asset") { $asset = Asset::getById($id); $typePath = self::getAssetTypePath($asset); $data = array("success" => true, "idPath" => Element_Service::getIdPath($asset), "typePath" => $typePath); $this->_helper->json($data); } else { $object = Object_Abstract::getById($id); $typePath = self::getTypePath($object); $data = array("success" => true, "idPath" => Element_Service::getIdPath($object), "typePath" => $typePath); $this->_helper->json($data); } }