Get the generator.

@return FormPageGenerator
332303
protected function createGenerator()
    {
        $filesystem = $this->getContainer()->get('filesystem');
        $registry = $this->getContainer()->get('doctrine');

        return new FormPageGenerator($filesystem, $registry, '/page', $this->assistant, $this->getContainer());
    }
138955
public function getGenerator(): \Generator
    {
        if ($this->generator instanceof ArrayyRewindableGenerator) {
            yield from $this->generator;
        }

        yield from $this->array;
    }
157063
protected function createGenerator()
    {
        $filesystem = $this->getContainer()->get('filesystem');
        $registry = $this->getContainer()->get('doctrine');

        return new PageGenerator($filesystem, $registry, '/page', $this->assistant, $this->getContainer());
    }
23184
public static function getInstance()
    {
        return new GeneratorFinderCache(
            new GeneratorFinder(
                TranstyperFactory::getInstance(),
                GeneratorValidatorFactory::getInstance(),
                new FileManager()
            ),
            Installer::getDirectories(),
            new FileManager()
        );
    }
107259
public function generate()
	{
		if (TL_MODE === 'BE') {
			return parent::generate();
		}

		$parentKey = ($this->arrData['ptable'] ?: 'tl_article') . '__' . $this->arrData['pid'];
		if (isset($GLOBALS['TL_RS_COLUMNS'][$parentKey]) && !$GLOBALS['TL_RS_COLUMNS'][$parentKey]['active']) {
			$GLOBALS['TL_RS_COLUMNS'][$parentKey]['active'] = true;
		}
		else {
			trigger_error('Missing column start element before column stop element ID ' . $this->id . '.', E_USER_WARNING);
		}

		return parent::generate();
	}
252239
public function getIterator() : \Generator
    {
        for ($current = $this->start; $current->isBeforeOrEqualTo($this->end); $current = $current->plusMonths(1)) {
            yield $current;
        }
    }
93925
protected function createGenerator()
    {
        $filesystem = $this->getContainer()->get('filesystem');
        $registry = $this->getContainer()->get('doctrine');

        return new DefaultPagePartGenerator($filesystem, $registry, '/pagepart', $this->assistant, $this->getContainer());
    }
1172601
public function generate()
    {
        if ($this->parentIdentifier && !$this->parentObj) {
            $this->determineParentObj();
        }


        $i = 0;
        $ids = array();
        $parentField = $this->parentField;
        while ($i < $this->count) {
            $obj = Injector::inst()->create($this->subjectClass);
            if ($this->parentObj) {
                $obj->$parentField = $this->parentObj->ID;
            }
            $obj->fill(array(
                'only_empty' => $this->onlyEmpty,
                'include_relations' => $this->includeRelations,
                'download_images' => $this->downloadImages,
                'relation_create_limit' => $this->relationCreateLimit
            ));
            if ($this->parentObj) {
                $obj->write();
            }
            if ($this->isSiteTree) {
                $ids[] = $obj->write();
                $obj->publish("Stage", "Live");
            }
            $this->log("Created {$this->subjectClass} \"{$obj->getTitle()}\".");
            $i++;
        }

        return $ids;
    }
900779
public function getUrlGenerator()
    {
        if (isset($this->urlGenerator)) {
            return $this->urlGenerator;
        }

        // Check if an URL Generator resolver was set.
        else if (! isset(static::$urlGeneratorResolver)) {
            throw new RuntimeException("URL Generator resolver not set on Paginator.");
        }

        return $this->urlGenerator = call_user_func(static::$urlGeneratorResolver, $this);
    }
102363
protected function getGenerator()
    {
        $facts = new \OxidEsales\Facts\Facts();
        $unifiedNameSpaceClassMapProvider = new \OxidEsales\UnifiedNameSpaceGenerator\UnifiedNameSpaceClassMapProvider($facts);

        return new \OxidEsales\UnifiedNameSpaceGenerator\Generator($facts, $unifiedNameSpaceClassMapProvider);
    }
148900
private function getOverridesIterator(): \Generator
    {
        try {
            $recursiveIterator = new \RecursiveIteratorIterator(
                new \RecursiveDirectoryIterator(
                    $this->getPathToOverridesDirectory(),
                    \RecursiveDirectoryIterator::SKIP_DOTS
                ),
                \RecursiveIteratorIterator::SELF_FIRST
            );
            foreach ($recursiveIterator as $fileInfo) {
                /**
                 * @var \SplFileInfo $fileInfo
                 */
                if ($fileInfo->isFile()) {
                    if (self::OVERRIDE_EXTENSION !== substr(
                        $fileInfo->getFilename(),
                        -strlen(self::OVERRIDE_EXTENSION)
                    )
                    ) {
                        continue;
                    }
                    yield $fileInfo->getPathname();
                }
            }
        } finally {
            $recursiveIterator = null;
            unset($recursiveIterator);
        }
    }
481586
protected function getEntityGenerator()
    {
        $entityGenerator = new EntityGenerator();
        $entityGenerator->setFieldVisibility(EntityGenerator::FIELD_VISIBLE_PROTECTED);
        $entityGenerator->setGenerateAnnotations(false);
        $entityGenerator->setGenerateStubMethods(true);
        $entityGenerator->setRegenerateEntityIfExists(false);
        $entityGenerator->setUpdateEntityIfExists(true);
        $entityGenerator->setNumSpaces(4);
        $entityGenerator->setAnnotationPrefix('ORM\\');

        if ($this->configuration['with_interface']) {
            $entityGenerator->setClassToInterface($this->configuration['namespace'] . '\\' . $this->model.'Interface');
        }

        return $entityGenerator;
    }
996949
public function convertGenerator() : \Generator {

		yield 1 => $this->generatorPrefix . __( 'Initializing', 'pressbooks' );

		// Sanity check

		if ( empty( $this->tmpDir ) || ! is_dir( $this->tmpDir ) ) {
			$this->logError( '$this->tmpDir must be set before calling convert().' );
			throw new \Exception();
		}

		if ( empty( $this->exportStylePath ) || ! is_file( $this->exportStylePath ) ) {
			$this->logError( '$this->exportStylePath must be set before calling convert().' );
			throw new \Exception();
		}

		// Convert
		yield 2 => $this->generatorPrefix . __( 'Preparing book contents', 'pressbooks' );
		$metadata = Book::getBookInformation();
		$book_contents = $this->preProcessBookContents( Book::getBookContents() );

		// Set two letter language code
		if ( isset( $metadata['pb_language'] ) ) {
			list( $this->lang ) = explode( '-', $metadata['pb_language'] );
		}

		try {

			yield 5 => $this->generatorPrefix . __( 'Creating container', 'pressbooks' );
			$this->createContainer();
			yield from $this->createOEBPSGenerator( $book_contents, $metadata );
			$this->createOPF( $book_contents, $metadata );
			$this->createNCX( $book_contents, $metadata );

		} catch ( \Exception $e ) {
			$this->logError( $e->getMessage() );
			throw new \Exception();
		}

		yield 75 => $this->generatorPrefix . __( 'Saving file to exports folder', 'pressbooks' );
		$filename = $this->timestampedFileName( $this->suffix );
		if ( ! $this->zipEpub( $filename ) ) {
			throw new \Exception();
		}
		$this->outputPath = $filename;
		yield 80 => $this->generatorPrefix . __( 'Export successful', 'pressbooks' );
	}
349228
public function getPreviousPage()
    {
        $previousPageIndex = $this->currentPage->getIndex() - 1;
        if (!$this->formDefinition->hasPageWithIndex($previousPageIndex)) {
            return null;
        }
        return $this->formDefinition->getPageByIndex($previousPageIndex);
    }
728461
public function getFormTemplate()
    {
        if (null === $this->formTemplate) {
            $template = rtrim($this->getTemplatePrefix(), '/') . '/' . $this->getFormSuffix();
            $this->setFormTemplate($template);
        }

        return $this->formTemplate;
    }
832054
public function getIterator(): \Generator
    {
        $line = '';
        foreach ($this->readIterator as $content) {
            $parts = explode($this->delimiter, $content);
            $partCount = \count($parts);
            if ($partCount > 1) {
                foreach ($parts as $i => $part) {
                    if ($i === 0) {
                        yield $line.$part;
                        continue;
                    }

                    if ($i === $partCount - 1) {
                        $line = $part;
                        continue;
                    }
                    yield $part;
                }
                continue;
            }
            $line .= $content;
        }
        yield $line;
    }
584839
public function getGenerator()
    {
        if (null !== $this->generator) {
            return $this->generator;
        }

        $compiled = is_a($this->options['generator_class'], CompiledUrlGenerator::class, true) && UrlGenerator::class === $this->options['generator_base_class'];

        if (null === $this->options['cache_dir'] || null === $this->options['generator_cache_class']) {
            $routes = $this->getRouteCollection();
            if ($compiled) {
                $routes = (new CompiledUrlGeneratorDumper($routes))->getCompiledRoutes();
            }
            $this->generator = new $this->options['generator_class']($routes, $this->context, $this->logger, $this->defaultLocale);
        } else {
            $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/'.$this->options['generator_cache_class'].'.php',
                function (ConfigCacheInterface $cache) {
                    $dumper = $this->getGeneratorDumperInstance();

                    $options = [
                        'class' => $this->options['generator_cache_class'],
                        'base_class' => $this->options['generator_base_class'],
                    ];

                    $cache->write($dumper->dump($options), $this->getRouteCollection()->getResources());
                }
            );

            if ($compiled) {
                $this->generator = new $this->options['generator_class'](require $cache->getPath(), $this->context, $this->logger);
            } else {
                if (!class_exists($this->options['generator_cache_class'], false)) {
                    require_once $cache->getPath();
                }

                $this->generator = new $this->options['generator_cache_class']($this->context, $this->logger, $this->defaultLocale);
            }
        }

        if ($this->generator instanceof ConfigurableRequirementsInterface) {
            $this->generator->setStrictRequirements($this->options['strict_requirements']);
        }

        return $this->generator;
    }