public function getVendorAndPluginNames()
    {
        $plugins = [];

        $dirPath = plugins_path();
        if (!File::isDirectory($dirPath)) {
            return $plugins;
        }

        $it = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($dirPath, RecursiveDirectoryIterator::FOLLOW_SYMLINKS)
        );
        $it->setMaxDepth(2);
        $it->rewind();

        while ($it->valid()) {
            if (($it->getDepth() > 1) && $it->isFile() && (strtolower($it->getFilename()) == "plugin.php")) {
                $filePath = dirname($it->getPathname());
                $pluginName = basename($filePath);
                $vendorName = basename(dirname($filePath));
                $plugins[$vendorName][$pluginName] = $filePath;
            }

            $it->next();
        }

        return $plugins;
    }
public function getVendorAndPluginNames()
    {
        $plugins = [];

        $dirPath = plugins_path();
        if (!File::isDirectory($dirPath)) {
            return $plugins;
        }

        $it = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($dirPath, RecursiveDirectoryIterator::FOLLOW_SYMLINKS)
        );
        $it->setMaxDepth(2);
        $it->rewind();

        while ($it->valid()) {
            if (($it->getDepth() > 1) && $it->isFile() && (strtolower($it->getFilename()) == "plugin.php")) {
                $filePath = dirname($it->getPathname());
                $pluginName = basename($filePath);
                $vendorName = basename(dirname($filePath));
                $plugins[$vendorName][$pluginName] = $filePath;
            }

            $it->next();
        }

        return $plugins;
    }
public function getVendorAndPluginNames ( ) { $ plugins = [ ] ; $ dirPath = plugins_path ( ) ; if ( ! File :: isDirectory ( $ dirPath ) ) { return $ plugins ; } $ it = new RecursiveIteratorIterator ( new RecursiveDirectoryIterator ( $ dirPath , RecursiveDirectoryIterator :: FOLLOW_SYMLINKS ) ) ; $ it -> setMaxDepth ( 2 ) ; $ it -> rewind ( ) ; while ( $ it -> valid ( ) ) { if ( ( $ it -> getDepth ( ) > 1 ) && $ it -> isFile ( ) && ( strtolower ( $ it -> getFilename ( ) ) == "plugin.php" ) ) { $ filePath = dirname ( $ it -> getPathname ( ) ) ; $ pluginName = basename ( $ filePath ) ; $ vendorName = basename ( dirname ( $ filePath ) ) ; $ plugins [ $ vendorName ] [ $ pluginName ] = $ filePath ; } $ it -> next ( ) ; } return $ plugins ; }
Returns a 2 dimensional array of vendors and their plugins.
Returns a 2 dimensional array of vendors and their plugins .