plugin/path/Entity/Path/Path.php
public function getRootSteps()
    {
        $roots = [];

        if (!empty($this->steps)) {
            foreach ($this->steps as $step) {
                if (null === $step->getParent()) {
                    // Root step found
                    $roots[] = $step;
                }
            }
        }

        return $roots;
    }
public function getRootSteps()
    {
        $roots = [];

        if (!empty($this->steps)) {
            foreach ($this->steps as $step) {
                if (null === $step->getParent()) {
                    // Root step found
                    $roots[] = $step;
                }
            }
        }

        return $roots;
    }
public function getRootSteps ( ) { $ roots = [ ] ; if ( ! empty ( $ this -> steps ) ) { foreach ( $ this -> steps as $ step ) { if ( null === $ step -> getParent ( ) ) { // Root step found $ roots [ ] = $ step ; } } } return $ roots ; }
Get root step of the path.

@return Step[]
Get root step of the path .