getRequiresDependenciesForFrontend() public static method

public static getRequiresDependenciesForFrontend ( Dependency $d ) : array
$d Pimcore\Model\Dependency
return array
Esempio n. 1
0
 public function getRequiresDependenciesAction()
 {
     $id = $this->getParam("id");
     $type = $this->getParam("controller");
     $allowedTypes = ["asset", "document", "object"];
     if ($id && in_array($type, $allowedTypes)) {
         $element = Model\Element\Service::getElementById($type, $id);
         if ($element instanceof Model\Element\ElementInterface) {
             $dependencies = Model\Element\Service::getRequiresDependenciesForFrontend($element->getDependencies());
             $this->_helper->json($dependencies);
         }
     }
     $this->_helper->json(false);
 }