private function findSubContextClasses()
    {
        $class_names = array();

        // Initialize any available sub-contexts.
        if (isset($this->parameters['subcontexts'])) {
            $paths = array();
            // Drivers may specify paths to subcontexts.
            if ($this->parameters['subcontexts']['autoload']) {
                foreach ($this->drupal->getDrivers() as $name => $driver) {
                    if ($driver instanceof SubDriverFinderInterface) {
                        $paths += $driver->getSubDriverPaths();
                    }
                }
            }

            // Additional subcontext locations may be specified manually in behat.yml.
            if (isset($this->parameters['subcontexts']['paths'])) {
                $paths = array_merge($paths, $this->parameters['subcontexts']['paths']);
            }

            // Load each class.
            foreach ($paths as $path) {
                if ($subcontexts = $this->findAvailableSubContexts($path)) {
                    $this->loadSubContexts($subcontexts);
                }
            }

            // Find all subcontexts, excluding abstract base classes.
            $classes = get_declared_classes();
            foreach ($classes as $class) {
                $reflect = new \ReflectionClass($class);
                if (!$reflect->isAbstract() && $reflect->implementsInterface('Drupal\DrupalExtension\Context\DrupalSubContextInterface')) {
                    $class_names[] = $class;
                }
            }
        }

        return $class_names;
    }
private function findSubContextClasses()
    {
        $class_names = array();

        // Initialize any available sub-contexts.
        if (isset($this->parameters['subcontexts'])) {
            $paths = array();
            // Drivers may specify paths to subcontexts.
            if ($this->parameters['subcontexts']['autoload']) {
                foreach ($this->drupal->getDrivers() as $name => $driver) {
                    if ($driver instanceof SubDriverFinderInterface) {
                        $paths += $driver->getSubDriverPaths();
                    }
                }
            }

            // Additional subcontext locations may be specified manually in behat.yml.
            if (isset($this->parameters['subcontexts']['paths'])) {
                $paths = array_merge($paths, $this->parameters['subcontexts']['paths']);
            }

            // Load each class.
            foreach ($paths as $path) {
                if ($subcontexts = $this->findAvailableSubContexts($path)) {
                    $this->loadSubContexts($subcontexts);
                }
            }

            // Find all subcontexts, excluding abstract base classes.
            $classes = get_declared_classes();
            foreach ($classes as $class) {
                $reflect = new \ReflectionClass($class);
                if (!$reflect->isAbstract() && $reflect->implementsInterface('Drupal\DrupalExtension\Context\DrupalSubContextInterface')) {
                    $class_names[] = $class;
                }
            }
        }

        return $class_names;
    }
private function findSubContextClasses ( ) { $ class_names = array ( ) ; // Initialize any available sub-contexts. if ( isset ( $ this -> parameters [ 'subcontexts' ] ) ) { $ paths = array ( ) ; // Drivers may specify paths to subcontexts. if ( $ this -> parameters [ 'subcontexts' ] [ 'autoload' ] ) { foreach ( $ this -> drupal -> getDrivers ( ) as $ name => $ driver ) { if ( $ driver instanceof SubDriverFinderInterface ) { $ paths += $ driver -> getSubDriverPaths ( ) ; } } } // Additional subcontext locations may be specified manually in behat.yml. if ( isset ( $ this -> parameters [ 'subcontexts' ] [ 'paths' ] ) ) { $ paths = array_merge ( $ paths , $ this -> parameters [ 'subcontexts' ] [ 'paths' ] ) ; } // Load each class. foreach ( $ paths as $ path ) { if ( $ subcontexts = $ this -> findAvailableSubContexts ( $ path ) ) { $ this -> loadSubContexts ( $ subcontexts ) ; } } // Find all subcontexts, excluding abstract base classes. $ classes = get_declared_classes ( ) ; foreach ( $ classes as $ class ) { $ reflect = new \ ReflectionClass ( $ class ) ; if ( ! $ reflect -> isAbstract ( ) && $ reflect -> implementsInterface ( 'Drupal\DrupalExtension\Context\DrupalSubContextInterface' ) ) { $ class_names [ ] = $ class ; } } } return $ class_names ; }
Finds and loads available subcontext classes.
Finds and loads available subcontext classes .