public function hasChildren() { $hardLink = $this->getHardLinkSource(); if ($hardLink->getChildrenFromSource() && $hardLink->getSourceDocument() && !\Pimcore::inAdmin()) { return parent::hasChildren(); } return false; }