Craft\Neo_CriteriaModel::__positionedBefore PHP 메소드

__positionedBefore() 보호된 메소드

protected __positionedBefore ( array $elements, int\Neo_BlockModel $value ) : array
$elements array
$value int\Neo_BlockModel
리턴 array
    protected function __positionedBefore($elements, $value)
    {
        $value = $this->_getBlock($value);
        if (!$value) {
            return $elements;
        }
        $index = $this->_indexOfRootBlock($elements, $value);
        if ($index <= 0) {
            return [];
        }
        return array_slice($elements, 0, $index);
    }