lib/Block/BlockDefinitionFactory.php
private function getCommonBlockDefinitionData(
        string $identifier,
        BlockDefinitionHandlerInterface $handler,
        array $config,
        array $configDefinitionHandlers
    ): array {
        $parameterBuilder = $this->parameterBuilderFactory->createParameterBuilder();
        $handler->buildParameters($parameterBuilder);

        $handlerPlugins = $this->handlerPluginRegistry->getPlugins(get_class($handler));
        foreach ($handlerPlugins as $handlerPlugin) {
            $handlerPlugin->buildParameters($parameterBuilder);
        }

        $parameterDefinitions = $parameterBuilder->buildParameterDefinitions();

        $configDefinitions = [];
        foreach ($configDefinitionHandlers as $configKey => $configDefinitionHandler) {
            $configDefinitions[$configKey] = $this->configDefinitionFactory->buildConfigDefinition(
                $configKey,
                $configDefinitionHandler
            );
        }

        return [
            'identifier' => $identifier,
            'handler' => $handler,
            'handlerPlugins' => $handlerPlugins,
            'parameterDefinitions' => $parameterDefinitions,
            'configDefinitions' => $configDefinitions,
        ] + $this->processConfig($identifier, $config);
    }
private function getCommonBlockDefinitionData(
        string $identifier,
        BlockDefinitionHandlerInterface $handler,
        array $config,
        array $configDefinitionHandlers
    ): array {
        $parameterBuilder = $this->parameterBuilderFactory->createParameterBuilder();
        $handler->buildParameters($parameterBuilder);

        $handlerPlugins = $this->handlerPluginRegistry->getPlugins(get_class($handler));
        foreach ($handlerPlugins as $handlerPlugin) {
            $handlerPlugin->buildParameters($parameterBuilder);
        }

        $parameterDefinitions = $parameterBuilder->buildParameterDefinitions();

        $configDefinitions = [];
        foreach ($configDefinitionHandlers as $configKey => $configDefinitionHandler) {
            $configDefinitions[$configKey] = $this->configDefinitionFactory->buildConfigDefinition(
                $configKey,
                $configDefinitionHandler
            );
        }

        return [
            'identifier' => $identifier,
            'handler' => $handler,
            'handlerPlugins' => $handlerPlugins,
            'parameterDefinitions' => $parameterDefinitions,
            'configDefinitions' => $configDefinitions,
        ] + $this->processConfig($identifier, $config);
    }
private function getCommonBlockDefinitionData ( string $ identifier , BlockDefinitionHandlerInterface $ handler , array $ config , array $ configDefinitionHandlers ) : array { $ parameterBuilder = $ this -> parameterBuilderFactory -> createParameterBuilder ( ) ; $ handler -> buildParameters ( $ parameterBuilder ) ; $ handlerPlugins = $ this -> handlerPluginRegistry -> getPlugins ( get_class ( $ handler ) ) ; foreach ( $ handlerPlugins as $ handlerPlugin ) { $ handlerPlugin -> buildParameters ( $ parameterBuilder ) ; } $ parameterDefinitions = $ parameterBuilder -> buildParameterDefinitions ( ) ; $ configDefinitions = [ ] ; foreach ( $ configDefinitionHandlers as $ configKey => $ configDefinitionHandler ) { $ configDefinitions [ $ configKey ] = $ this -> configDefinitionFactory -> buildConfigDefinition ( $ configKey , $ configDefinitionHandler ) ; } return [ 'identifier' => $ identifier , 'handler' => $ handler , 'handlerPlugins' => $ handlerPlugins , 'parameterDefinitions' => $ parameterDefinitions , 'configDefinitions' => $ configDefinitions , ] + $ this -> processConfig ( $ identifier , $ config ) ; }
Returns the data common to all block definition types.

@param string $identifier
@param \Netgen\BlockManager\Block\BlockDefinition\BlockDefinitionHandlerInterface $handler
@param array<string, mixed> $config
@param \Netgen\BlockManager\Config\ConfigDefinitionHandlerInterface[] $configDefinitionHandlers

@return array<string, mixed>
Returns the data common to all block definition types .