private function setPluginWidthXmlAttribute($pluginXml, $pluginSettings){
        
        try {
            
            $pluginDesktop = isset($pluginSettings['width_desktop']) ? $pluginSettings['width_desktop'] : 100;
            $pluginTablet  = isset($pluginSettings['width_tablet'])  ? $pluginSettings['width_tablet']  : 100;
            $pluginMobile  = isset($pluginSettings['width_mobile'])  ? $pluginSettings['width_mobile']  : 100;
            
            // Parsing xml string to Xml object
            $xml = simplexml_load_string($pluginXml);
            
            // Adding/updating plugin xml attributes
            if (isset($xml->attributes()->width_desktop))
                $xml->attributes()->width_desktop = $pluginDesktop;
            else
                $xml->addAttribute('width_desktop', $pluginDesktop);
                    
            if (isset($xml->attributes()->width_tablet))
                $xml->attributes()->width_tablet = $pluginTablet;
            else
                $xml->addAttribute('width_tablet', $pluginTablet);
                            
            if (isset($xml->attributes()->width_mobile))
                $xml->attributes()->width_mobile = $pluginMobile;
            else
                $xml->addAttribute('width_mobile', $pluginMobile);
                
            // Geeting the Plugin xml
            $customXML = new \SimpleXMLElement($xml->asXML());
            $dom = dom_import_simplexml($customXML);
            $pluginXml = $dom->ownerDocument->saveXML($dom->ownerDocument->documentElement);
                                    
        }catch (\Exception $e){}
        
        return $pluginXml;
    }
private function setPluginWidthXmlAttribute($pluginXml, $pluginSettings){
        
        try {
            
            $pluginDesktop = isset($pluginSettings['width_desktop']) ? $pluginSettings['width_desktop'] : 100;
            $pluginTablet  = isset($pluginSettings['width_tablet'])  ? $pluginSettings['width_tablet']  : 100;
            $pluginMobile  = isset($pluginSettings['width_mobile'])  ? $pluginSettings['width_mobile']  : 100;
            
            // Parsing xml string to Xml object
            $xml = simplexml_load_string($pluginXml);
            
            // Adding/updating plugin xml attributes
            if (isset($xml->attributes()->width_desktop))
                $xml->attributes()->width_desktop = $pluginDesktop;
            else
                $xml->addAttribute('width_desktop', $pluginDesktop);
                    
            if (isset($xml->attributes()->width_tablet))
                $xml->attributes()->width_tablet = $pluginTablet;
            else
                $xml->addAttribute('width_tablet', $pluginTablet);
                            
            if (isset($xml->attributes()->width_mobile))
                $xml->attributes()->width_mobile = $pluginMobile;
            else
                $xml->addAttribute('width_mobile', $pluginMobile);
                
            // Geeting the Plugin xml
            $customXML = new \SimpleXMLElement($xml->asXML());
            $dom = dom_import_simplexml($customXML);
            $pluginXml = $dom->ownerDocument->saveXML($dom->ownerDocument->documentElement);
                                    
        }catch (\Exception $e){}
        
        return $pluginXml;
    }
private function setPluginWidthXmlAttribute ( $ pluginXml , $ pluginSettings ) { try { $ pluginDesktop = isset ( $ pluginSettings [ 'width_desktop' ] ) ? $ pluginSettings [ 'width_desktop' ] : 100 ; $ pluginTablet = isset ( $ pluginSettings [ 'width_tablet' ] ) ? $ pluginSettings [ 'width_tablet' ] : 100 ; $ pluginMobile = isset ( $ pluginSettings [ 'width_mobile' ] ) ? $ pluginSettings [ 'width_mobile' ] : 100 ; // Parsing xml string to Xml object $ xml = simplexml_load_string ( $ pluginXml ) ; // Adding/updating plugin xml attributes if ( isset ( $ xml -> attributes ( ) -> width_desktop ) ) $ xml -> attributes ( ) -> width_desktop = $ pluginDesktop ; else $ xml -> addAttribute ( 'width_desktop' , $ pluginDesktop ) ; if ( isset ( $ xml -> attributes ( ) -> width_tablet ) ) $ xml -> attributes ( ) -> width_tablet = $ pluginTablet ; else $ xml -> addAttribute ( 'width_tablet' , $ pluginTablet ) ; if ( isset ( $ xml -> attributes ( ) -> width_mobile ) ) $ xml -> attributes ( ) -> width_mobile = $ pluginMobile ; else $ xml -> addAttribute ( 'width_mobile' , $ pluginMobile ) ; // Geeting the Plugin xml $ customXML = new \ SimpleXMLElement ( $ xml -> asXML ( ) ) ; $ dom = dom_import_simplexml ( $ customXML ) ; $ pluginXml = $ dom -> ownerDocument -> saveXML ( $ dom -> ownerDocument -> documentElement ) ; } catch ( \ Exception $ e ) { } return $ pluginXml ; }
This method will setup the width of the plugin xml config

@param String $pluginXml
@param array $pluginSettings
@return string
This method will setup the width of the plugin xml config