Craft\Neo_BlockModel::getDescendants PHP Method

getDescendants() public method

Returns the block's descendants.
public getDescendants ( integer | null $dist = null ) : craft\ElementCriteriaModel
$dist integer | null
return craft\ElementCriteriaModel
    public function getDescendants($dist = null)
    {
        // If the request is in Live Preview mode, use the Neo-extended criteria model, which supports Live Preview mode
        if (craft()->neo->isPreviewMode()) {
            if (!isset($this->_liveCriteria['descendants'])) {
                $criteria = craft()->neo->getCriteria();
                $criteria->setAllElements($this->_allElements);
                $criteria->descendantOf = $this;
                $this->_liveCriteria['descendants'] = $criteria;
            }
            if ($dist) {
                return $this->_liveCriteria['descendants']->descendantDist($dist);
            }
            return $this->_liveCriteria['descendants'];
        }
        return parent::getDescendants($dist);
    }