Contao\PageSelector::getPathNodes PHP Method

getPathNodes() protected method

Get the IDs of all parent pages of the selected pages, so they are expanded automatically
protected getPathNodes ( )
    protected function getPathNodes()
    {
        if (!$this->varValue) {
            return;
        }
        if (!is_array($this->varValue)) {
            $this->varValue = array($this->varValue);
        }
        foreach ($this->varValue as $id) {
            $arrPids = $this->Database->getParentRecords($id, 'tl_page');
            array_shift($arrPids);
            // the first element is the ID of the page itself
            $this->arrNodes = array_merge($this->arrNodes, $arrPids);
        }
    }