Craft\Neo_BlockModel::setAllElements PHP Method

setAllElements() public method

This is used for Live Preview mode, where certain methods, like getAncestors, create element criteria models which need a local set of blocks to query against.
public setAllElements ( array $elements )
$elements array
    public function setAllElements($elements)
    {
        $this->_allElements = $elements;
        // Update the elements across any memoized criteria models
        foreach ($this->_liveCriteria as $name => $criteria) {
            $criteria->setAllElements($this->_allElements);
        }
    }