public function getWidgetResourcesFor($widget)
    {
        $resources = array(
            "js"=>array(),
            "css"=>array(),
            "replacingCss"=>array(),
            "replacingJs"=>array(),
        );

        if (gettype($widget)!="string") {
            $widget = get_class($widget);            
        }
        $settings = $this->themeWidgets()[$widget];

        if (isset($settings["folder"])) {
            $version = Utility::get($this->themeInfo(), "version", "");
            $assetUrl = $this->getReport()
                ->getResourceManager()
                ->publishAssetFolder(
                    realpath(
                        dirname(Utility::getClassPath($this))."/".$settings["folder"]
                    ),
                    $version
                );
            
            
            $replacingCss = Utility::get($settings, "replacingCss", array());
            $resources["replacingCss"] = $this->addingAssetUrl(
                $assetUrl,
                $replacingCss
            );
                
            $css = Utility::get($settings, "css", array());
            $resources["css"] = $this->addingAssetUrl($assetUrl, $css);

            $replacingJs = Utility::get($settings, "replacingJs", array());
            $resources["replacingJs"] = $this->addingAssetUrl($assetUrl, $replacingJs);

            $js = Utility::get($settings, "js", array());
            $resources["js"] = $this->addingAssetUrl($assetUrl, $js);
        }
        return $resources;
    }
public function getWidgetResourcesFor($widget)
    {
        $resources = array(
            "js"=>array(),
            "css"=>array(),
            "replacingCss"=>array(),
            "replacingJs"=>array(),
        );

        if (gettype($widget)!="string") {
            $widget = get_class($widget);            
        }
        $settings = $this->themeWidgets()[$widget];

        if (isset($settings["folder"])) {
            $version = Utility::get($this->themeInfo(), "version", "");
            $assetUrl = $this->getReport()
                ->getResourceManager()
                ->publishAssetFolder(
                    realpath(
                        dirname(Utility::getClassPath($this))."/".$settings["folder"]
                    ),
                    $version
                );
            
            
            $replacingCss = Utility::get($settings, "replacingCss", array());
            $resources["replacingCss"] = $this->addingAssetUrl(
                $assetUrl,
                $replacingCss
            );
                
            $css = Utility::get($settings, "css", array());
            $resources["css"] = $this->addingAssetUrl($assetUrl, $css);

            $replacingJs = Utility::get($settings, "replacingJs", array());
            $resources["replacingJs"] = $this->addingAssetUrl($assetUrl, $replacingJs);

            $js = Utility::get($settings, "js", array());
            $resources["js"] = $this->addingAssetUrl($assetUrl, $js);
        }
        return $resources;
    }
public function getWidgetResourcesFor ( $ widget ) { $ resources = array ( "js" => array ( ) , "css" => array ( ) , "replacingCss" => array ( ) , "replacingJs" => array ( ) , ) ; if ( gettype ( $ widget ) != "string" ) { $ widget = get_class ( $ widget ) ; } $ settings = $ this -> themeWidgets ( ) [ $ widget ] ; if ( isset ( $ settings [ "folder" ] ) ) { $ version = Utility :: get ( $ this -> themeInfo ( ) , "version" , "" ) ; $ assetUrl = $ this -> getReport ( ) -> getResourceManager ( ) -> publishAssetFolder ( realpath ( dirname ( Utility :: getClassPath ( $ this ) ) . "/" . $ settings [ "folder" ] ) , $ version ) ; $ replacingCss = Utility :: get ( $ settings , "replacingCss" , array ( ) ) ; $ resources [ "replacingCss" ] = $ this -> addingAssetUrl ( $ assetUrl , $ replacingCss ) ; $ css = Utility :: get ( $ settings , "css" , array ( ) ) ; $ resources [ "css" ] = $ this -> addingAssetUrl ( $ assetUrl , $ css ) ; $ replacingJs = Utility :: get ( $ settings , "replacingJs" , array ( ) ) ; $ resources [ "replacingJs" ] = $ this -> addingAssetUrl ( $ assetUrl , $ replacingJs ) ; $ js = Utility :: get ( $ settings , "js" , array ( ) ) ; $ resources [ "js" ] = $ this -> addingAssetUrl ( $ assetUrl , $ js ) ; } return $ resources ; }
Return resources information of an widget

The method will check if the theme support this widget and if yes,
it will return supported resources provided by the theme.

@param mixed $widget We can input either name of widget class
or the widget object

@return array Associated array contaning resources for widget.
Return resources information of an widget