public function merge(PluginConfiguration $newPluginConfiguration)
    {
        $newPluginConfiguration = clone $newPluginConfiguration;
        $fields = $newPluginConfiguration->getFields();

        foreach ($fields as $fieldName => $field) {
            if ($this->hasField($fieldName)) {
                $newPluginConfiguration
                    ->setFieldValue(
                        $fieldName,
                        $this->getFieldValue($fieldName)
                    );
            }
        }

        $this->setConfiguration($newPluginConfiguration->getConfiguration());

        return $this;
    }
public function merge(PluginConfiguration $newPluginConfiguration)
    {
        $newPluginConfiguration = clone $newPluginConfiguration;
        $fields = $newPluginConfiguration->getFields();

        foreach ($fields as $fieldName => $field) {
            if ($this->hasField($fieldName)) {
                $newPluginConfiguration
                    ->setFieldValue(
                        $fieldName,
                        $this->getFieldValue($fieldName)
                    );
            }
        }

        $this->setConfiguration($newPluginConfiguration->getConfiguration());

        return $this;
    }
public function merge ( PluginConfiguration $ newPluginConfiguration ) { $ newPluginConfiguration = clone $ newPluginConfiguration ; $ fields = $ newPluginConfiguration -> getFields ( ) ; foreach ( $ fields as $ fieldName => $ field ) { if ( $ this -> hasField ( $ fieldName ) ) { $ newPluginConfiguration -> setFieldValue ( $ fieldName , $ this -> getFieldValue ( $ fieldName ) ) ; } } $ this -> setConfiguration ( $ newPluginConfiguration -> getConfiguration ( ) ) ; return $ this ; }
Merge this configuration instance with a new one, and saves the result in
this instance.

This method will give priority to its own properties values.

@param PluginConfiguration $newPluginConfiguration New plugin configuration

@return $this Self object
Merge this configuration instance with a new one and saves the result in this instance .