@param \Popo\Schema\Bundle\BundleSchemaInterface $bundleSchema
@param array $additionalBundleSchemaCollection

@return array
518616
protected function mergeProperties(BundleSchemaInterface $bundleSchema, array $additionalBundleSchemaCollection): array
    {
        $bundleSchemaProperties = $this->schemaBuilder->buildProperties($bundleSchema->getSchema());

        $propertiesToMerge = [];
        foreach ($additionalBundleSchemaCollection as $additionalBundleSchema) {
            $additionalProperties = $this->schemaBuilder->buildProperties(
                $additionalBundleSchema->getSchema()
            );

            $this->schemaValidator->assertProperties(
                $bundleSchema,
                $bundleSchemaProperties,
                $additionalBundleSchema,
                $additionalProperties
            );

            $propertiesToMerge = \array_merge(
                $propertiesToMerge,
                $additionalProperties
            );
        }

        $bundleSchemaProperties = \array_merge($bundleSchemaProperties, $propertiesToMerge);

        return $bundleSchemaProperties;
    }
773945
protected function getDimensionsToSelect($dimensions, $additionalSelects)
    {
        if (empty($additionalSelects)) {
            return $dimensions;
        }

        $dimensionsToSelect = array();
        foreach ($dimensions as $selectAs => $dimension) {
            $asAlias = $this->getSelectAliasAs($dimension);
            foreach ($additionalSelects as $additionalSelect) {
                if (strpos($additionalSelect, $asAlias) === false) {
                    $dimensionsToSelect[$selectAs] = $dimension;
                }
            }
        }

        $dimensionsToSelect = array_unique($dimensionsToSelect);
        return $dimensionsToSelect;
    }
606524
public function getMappings(array $bundles)
    {
        $output = [];
        foreach ($bundles as $name => $bundleConfig) {
            // Backward compatibility hack for support.
            if (!is_array($bundleConfig)) {
                $name = $bundleConfig;
                $bundleConfig = [];
            }
            $mappings = $this->getBundleMapping($name, $bundleConfig);

            $alreadyDefinedTypes = array_intersect_key($mappings, $output);
            if (count($alreadyDefinedTypes)) {
                throw new \LogicException(
                    implode(',', array_keys($alreadyDefinedTypes)) .
                    ' type(s) already defined in other document, you can use the same ' .
                    'type only once in a manager definition.'
                );
            }

            $output = array_merge($output, $mappings);
        }

        return $output;
    }
1245944
public function buildBundleSchemaWithProperties(
        BundleSchemaInterface $sourceBundleSchema,
        array $propertyCollection
    ): BundleSchemaInterface {
        $schemaData = [];
        foreach ($propertyCollection as $property) {
            $schemaData[] = $property->toArray();
        }

        $schema = $this->readerFactory->createSchema()
            ->setName($sourceBundleSchema->getSchema()->getName())
            ->setSchema($schemaData);

        $bundleSchema = $this->bundleSchemaFactory->createBundleSchema(
            $schema,
            $sourceBundleSchema->getSchemaFilename()
        );

        return $bundleSchema;
    }
827632
public function generateMigrationQueries(Bundle $bundle, AbstractPlatform $platform)
    {
        $schemas = $this->getSchemas();
        $fromSchema = $schemas['fromSchema'];
        $toSchema = $schemas['toSchema'];

        $bundleTables = $this->getBundleTables($bundle, $schemas['metadata']);
        $this->filterSchemas(array($fromSchema, $toSchema), $bundleTables);

        $upQueries = $fromSchema->getMigrateToSql($toSchema, $platform);
        $downQueries = $fromSchema->getMigrateFromSql($toSchema, $platform);

        return array(
            self::QUERIES_UP => $upQueries,
            self::QUERIES_DOWN => $downQueries
        );
    }
789435
public static function additionalConfiguration($extensionKey)
    {
        // Get the configuration
        $extConf = self::getSanitizedExtConf($extensionKey);

        if ($extConf['cachingConfigEnable'] == 1) {
            self::handleCachingConfiguration($extConf);
        }
    }
1265770
public function getClientMapping(array $bundles)
    {
        /** @var array $typesMapping Array of filtered mappings for the elasticsearch client*/
        $typesMapping = null;

        /** @var array $mappings All mapping info */
        $mappings = $this->getMappings($bundles);

        foreach ($mappings as $type => $mapping) {
            if (!empty($mapping['properties'])) {
                $typesMapping[$type] = array_filter(
                    array_merge(
                        ['properties' => $mapping['properties']],
                        $mapping['fields']
                    ),
                    function ($value) {
                        return (bool)$value || is_bool($value);
                    }
                );
            }
        }

        return $typesMapping;
    }
501787
public function writeAdditionalConfiguration(array $additionalConfigurationLines)
    {
        return GeneralUtility::writeFile(
            Environment::getPublicPath() . '/' . $this->additionalConfigurationFile,
            '<?php' . LF .
                implode(LF, $additionalConfigurationLines) . LF
        );
    }
922256
protected function getSuitableParentTags(array $additionalTags = [])
    {
        return array_merge([
            WsdlDocument::TAG_ELEMENT,
            WsdlDocument::TAG_ATTRIBUTE,
            WsdlDocument::TAG_SIMPLE_TYPE,
            WsdlDocument::TAG_COMPLEX_TYPE,
        ], $additionalTags);
    }
1280331
protected function getRequiredClientBundleCodeGenerators($bundle)
    {
        return [
            $this->createClientDependencyProviderCodeGenerator($bundle),
            $this->createClientFactoryCodeGenerator($bundle),
            $this->createClientCodeGenerator($bundle),
            $this->createClientInterfaceCodeGenerator($bundle),
            $this->createStubCodeGenerator($bundle),
            $this->createStubInterfaceCodeGenerator($bundle),
            $this->createGatewayControllerCodeGenerator($bundle),
        ];
    }
639837
public static function getPackage( $taxonomyPackage, $additionalPackageClasses = array() )
	{
		if ( ! is_array( $additionalPackageClasses ) )
		{
			$additionalPackageClasses = array();
		}

		$packageClassesFile = __DIR__ . '/TaxonomyPackageTypes.json';
		$packageClasses = null;
		if ( file_exists( __DIR__ . '/TaxonomyPackageTypes.json' ) )
		{
			// echo file_get_contents( __DIR__ . '/TaxonomyPackageTypes.json' );
			$json = json_decode( file_get_contents( __DIR__ . '/TaxonomyPackageTypes.json' ), true );
			if ( $json && isset( $json['classNames'] ) )
			{
				$packageClasses = $json['classNames'];
			}
			else
			{
				echo "Unable to load the package classes JSON file" . XBRL::json_last_error_msg() , "\n";
			}
		}

		if ( ! $packageClasses )
		{
			$packageClasses = array( 'XBRL_TaxonomyPackage', 'XBRL_SEC_JSON_Package', 'XBRL_SEC_XML_Package', 'XBRL_SimplePackage' );
		}

		// Any additional package classes should be evaluated first.
		// Additional classes should make sure there is validation so they are not used when they are really not suitable
		$packageClasses = $additionalPackageClasses + $packageClasses;

		foreach ( $packageClasses as $packageClassName )
		{
			/** @var XBRL_Package $package */
			$package = XBRL_Package::fromFile( $taxonomyPackage, $packageClassName );
			if ( ! $package->isPackage() ) continue;

			// Load the XBRL class
			$className = $package->getXBRLClassname();
			class_exists( $className, true );
			return $package;
		}

		if ( ! $found )
		{
			$zip = basename( $taxonomyPackage );
			throw new Exception( "The contents of file '$zip' do not match any of the supported taxonomy package formats" );
		}
	}
1070110
protected function getAvailablePages(BundleInterface $bundle)
    {
        $pages = [];
        $counter = 1;

        // Get the available pages from disc
        $dir = $bundle->getPath().'/Entity/Pages/';
        if (file_exists($dir) && is_dir($dir)) {
            $finder = new Finder();
            $finder->files()->in($dir)->depth('== 0');
            foreach ($finder as $file) {
                $pages[$counter++] = [
                    'name' => substr($file->getFileName(), 0, strlen($file->getFileName()) - 4),
                    'path' => $file->getPathName(),
                ];
            }
        }

        return $pages;
    }
674982
protected function getDropSqlStatementsForExistingSchema(
        Schema $newSchema,
        AbstractPlatform $databasePlatform
    ): array {
        $existingSchema = $this->db->getSchemaManager()->createSchema();
        $statements = [];
        // reverse table order for clean-up (due to FKs)
        $tables = array_reverse($newSchema->getTables());
        // cleanup pre-existing database
        foreach ($tables as $table) {
            if ($existingSchema->hasTable($table->getName())) {
                $statements[] = $databasePlatform->getDropTableSQL($table);
            }
        }

        return $statements;
    }
33588
protected function generateCrud(AbstractResourceBundle $bundle)
    {
        $summary = array();
        $this->generateMacrosView($bundle);

        if (in_array('index', $this->configuration['actions'])) {
            $this->generateIndexView($bundle, $summary);
        }

        if (in_array('show', $this->configuration['actions'])) {
            $this->generateShowView($bundle, $summary);
        }

        if (in_array('create', $this->configuration['actions'])) {
            $this->generateCreateView($bundle, $summary);
        }

        if (in_array('update', $this->configuration['actions'])) {
            $this->generateUpdateView($bundle, $summary);
        }

        $this->writeOutput($summary);
    }
1250335
protected function getDocumentAsArray(SearchResult $document, $additionalTopResultsFields = []) : array
    {
        $fields = [
            'link' => $document->getUrl(),
            'type' => $document['type_stringS'] ? $document['type_stringS'] : $document->getType(),
            'title' => $document->getTitle(),
            'content' => $document->getContent(),
            'group' => $document->getHasGroupItem() ? $document->getGroupItem()->getGroupValue() : '',
            'previewImage' => $document['previewImage_stringS'] ? $document['previewImage_stringS'] : '',
        ];
        foreach ($additionalTopResultsFields as $additionalTopResultsField) {
            $fields[$additionalTopResultsField] = $document[$additionalTopResultsField] ? $document[$additionalTopResultsField] : '';
        }
        return $fields;
    }
1333786
public function build(string $schemaDirectory, SchemaConfiguratorInterface $configurator): array
    {
        $schemaFiles = $this->fileLoader->load(
            $schemaDirectory,
            $configurator->getSchemaPath(),
            $configurator->getSchemaFilename()
        );

        $fileInfoCollection = $this->groupBySchemaFile($schemaFiles);

        $data = [];
        foreach ($fileInfoCollection as $schemaFilename => $bundleSchemaFileCollection) {
            foreach ($bundleSchemaFileCollection as $bundleSchemaFile) {
                /** @var \Symfony\Component\Finder\SplFileInfo $bundleSchemaFile */
                $data[$schemaFilename][$bundleSchemaFile->getRelativePath()] = $this->buildBundleSchemaFiles(
                    $bundleSchemaFile,
                    $configurator
                );
            }
        }

        return $data;
    }
86762
protected function buildExtendedEntityPropertyHintTypeMap(array $propertySchema, DocBlockHelper $helper) {
		$propertyHintMap = [];

		foreach ($propertySchema as $property => $info) {
			if ($info['kind'] === 'column') {
				$type = $this->columnTypeToHintType($info['type']);
				if ($type === null) {
					continue;
				}

				$propertyHintMap[$property] = $helper->columnTypeNullable($info, $type);
			}
		}

		return $propertyHintMap;
	}