getRequiredByDependenciesForFrontend() public static method

public static getRequiredByDependenciesForFrontend ( Dependency $d ) : array
$d Pimcore\Model\Dependency
return array
示例#1
0
 /**
  *
  */
 public function getRequiredByDependenciesAction()
 {
     $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::getRequiredByDependenciesForFrontend($element->getDependencies());
             $this->_helper->json($dependencies);
         }
     }
     $this->_helper->json(false);
 }