Neos\Flow\Package\PackageManager::getCurrentPackageStates PHP Method

getCurrentPackageStates() protected method

Loads the states of available packages from the PackageStates.php file and initialises a package scan if the file was not found or the configuration format was not current.
protected getCurrentPackageStates ( ) : array
return array
    protected function getCurrentPackageStates()
    {
        $savePackageStates = false;
        $loadedPackageStates = $this->loadPackageStates();
        if (empty($loadedPackageStates) || !isset($loadedPackageStates['version']) || $loadedPackageStates['version'] < self::PACKAGESTATE_FORMAT_VERSION) {
            $loadedPackageStates = $this->scanAvailablePackages($loadedPackageStates);
            $savePackageStates = true;
        }
        if ($savePackageStates) {
            $loadedPackageStates = $this->sortAndSavePackageStates($loadedPackageStates);
        }
        return $loadedPackageStates;
    }