getTypePath() public static method

public static getTypePath ( $element ) : string
$element
return string
Exemplo n.º 1
0
 public function typePathAction()
 {
     $id = $this->getParam("id");
     $type = $this->getParam("type");
     $data = [];
     if ($type == "asset") {
         $element = Asset::getById($id);
     } elseif ($type == "document") {
         $element = Document::getById($id);
         $data["index"] = $element->getIndex();
     } else {
         $element = Object::getById($id);
     }
     $typePath = Element\Service::getTypePath($element);
     $data["success"] = true;
     $data["idPath"] = Element\Service::getIdPath($element);
     $data["typePath"] = $typePath;
     $data["fullpath"] = $element->getRealFullPath();
     $this->_helper->json($data);
 }