Ejemplo n.º 1
0
 public function getChilds()
 {
     if ($this->childs === null) {
         $childs = parent::getChilds();
         $hardLink = $this->getHardLinkSource();
         if ($hardLink->getChildsFromSource() && $hardLink->getSourceDocument() && !Pimcore::inAdmin()) {
             foreach ($childs as &$c) {
                 $c = Document_Hardlink_Wrapper::wrap($c);
                 $c->setHardLinkSource($hardLink);
                 $c->setPath(preg_replace("@^" . preg_quote($hardLink->getSourceDocument()->getFullpath()) . "@", $hardLink->getFullpath(), $c->getPath()));
             }
         }
         $this->setChilds($childs);
     }
     return $this->childs;
 }