src/Block.php
public function parents($current = false)
    {
        $instances = [];
        $instance  = $current ? $this : $this->_parent;

        while ($instance !== null) {
            $instances[] = $instance;
            $instance = $instance->_parent;
        }
        return array_reverse($instances);
    }
public function parents($current = false)
    {
        $instances = [];
        $instance  = $current ? $this : $this->_parent;

        while ($instance !== null) {
            $instances[] = $instance;
            $instance = $instance->_parent;
        }
        return array_reverse($instances);
    }
public function parents ( $ current = false ) { $ instances = [ ] ; $ instance = $ current ? $ this : $ this -> _parent ; while ( $ instance !== null ) { $ instances [ ] = $ instance ; $ instance = $ instance -> _parent ; } return array_reverse ( $ instances ) ; }
Return all parent block instances.

@param  boolean $current If `true` include `$this` to the list.
@return array.
Return all parent block instances .