re\Core\System\Snippet\SnippetDefinition */ protected static function getSnippetDefinition2Service($container) { $container->services['sales_channel_definition.Shopware\\Core\\System\\Snippet\\SnippetDefinition'] = $instance = new \Shopware\Core\System\Snippet\SnippetDefinition(); $instance->compile(($container->services['Shopware\\Core\\System\\SalesChannel\\Entity\\SalesChannelDefinitionInstanceRegistry'] ?? self::getSalesChannelDefinitionInstanceRegistryService($container))); return $instance; } /* * Gets the public 'sales_channel_definition.Shopware\Core\System\StateMachine\Aggregation\StateMachineHistory\StateMachineHistoryDefinition' shared service. * * @return \Shopware\Core\System\StateMachine\Aggregation\StateMachineHistory\StateMachineHistoryDefinition */ protected static function getStateMachineHistoryDefinition2Service($container) { include_once \dirname(__DIR__, 4).'/vendor/shopware/core/System/StateMachine/Aggregation/StateMachineHistory/StateMachineHistoryDefinition.php'; $container->services['sales_channel_definition.Shopware\\Core\\System\\StateMachine\\Aggregation\\StateMachineHistory\\StateMachineHistoryDefinition'] = $instance = new \Shopware\Core\System\StateMachine\Aggregation\StateMachineHistory\StateMachineHistoryDefinition(); $instance->compile(($container->services['Shopware\\Core\\System\\SalesChannel\\Entity\\SalesChannelDefinitionInstanceRegistry'] ?? self::getSalesChannelDefinitionInstanceRegistryService($container))); return $instance; } /* * Gets the public 'sales_channel_definition.Shopware\Core\System\StateMachine\Aggregation\StateMachineState\StateMachineStateDefinition' shared service. * * @return \Shopware\Core\System\StateMachine\Aggregation\StateMachineState\StateMachineStateDefinition */ protected static function getStateMachineStateDefinition2Service($container) { include_once \dirname(__DIR__, 4).'/vendor/shopware/core/System/StateMachine/Aggregation/StateMachineState/StateMachineStateDefinition.php'; $container->services['sales_channel_definition.Shopware\\Core\\System\\StateMachine\\Aggregation\\StateMachineState\\StateMachineStateDefinition'] = $instance = new \Shopware\Core\System\StateMachine\Aggregation\StateMachineState\StateMachineStateDefinition(); $instance->compile(($container->services['Shopware\\Core\\System\\SalesChannel\\Entity\\SalesChannelDefinitionInstanceRegistry'] ?? self::getSalesChannelDefinitionInstanceRegistryService($container))); return $instance; } /* * Gets the public 'sales_channel_definition.Shopware\Core\System\StateMachine\Aggregation\StateMachineState\StateMachineStateTranslationDefinition' shared service. * * @return \Shopware\Core\System\StateMachine\Aggregation\StateMachineState\StateMachineStateTranslationDefinition */ protected static function getStateMachineStateTranslationDefinition2Service($container) { include_once \dirname(__DIR__, 4).'/vendor/shopware/core/Framework/DataAbstractionLayer/EntityTranslationDefinition.php'; include_once \dirname(__DIR__, 4).'/vendor/shopware/core/System/StateMachine/Aggregation/StateMachineState/StateMachineStateTranslationDefinition.php'; $container->services['sales_channel_definition.Shopware\\Core\\System\\StateMachine\\Aggregation\\StateMachineState\\StateMachineStateTranslationDefinition'] = $instance = new \Shopware\Core\System\StateMachine\Aggregation\StateMachineState\StateMachineStateTranslationDefinition(); $instance->compile(($container->services['Shopware\\Core\\System\\SalesChannel\\Entity\\SalesChannelDefinitionInstanceRegistry'] ?? self::getSalesChannelDefinitionInstanceRegistryService($container))); return $instance; } /* * Gets the public 'sales_channel_definition.Shopware\Core\System\StateMachine\Aggregation\StateMachineTransition\StateMachineTransitionDefinition' shared service. * * @return \Shopware\Core\S $block_name, $block_style_name ) { if ( ! $this->is_registered( $block_name, $block_style_name ) ) { return null; } return $this->registered_block_styles[ $block_name ][ $block_style_name ]; } /** * Retrieves all registered block styles. * * @since 5.3.0 * * @return array[] Array of arrays containing the registered block styles properties grouped by block type. */ public function get_all_registered() { return $this->registered_block_styles; } /** * Retrieves registered block styles for a specific block type. * * @since 5.3.0 * * @param string $block_name Block type name including namespace. * @return array[] Array whose keys are block style names and whose values are block style properties. */ public function get_registered_styles_for_block( $block_name ) { if ( isset( $this->registered_block_styles[ $block_name ] ) ) { return $this->registered_block_styles[ $block_name ]; } return array(); } /** * Checks if a block style is registered for the given block type. * * @since 5.3.0 * * @param string $block_name Block type name including namespace. * @param string $block_style_name Block style name. * @return bool True if the block style is registered, false otherwise. */ public function is_registered( $block_name, $block_style_name ) { return isset( $this->registered_block_styles[ $block_name ][ $block_style_name ] ); } /** * Utility method to retrieve the main instance of the class. * * The instance will be created if it does not exist yet. * * @since 5.3.0 * * @return WP_Block_Styles_Registry The main instance. */ public static function get_instance() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; } }