public function publish($assetFolder)
    {
        $widgetSourceAssetPath = dirname(Utility::getClassPath($this->widget))
        ."/".$assetFolder;
        
        if (!is_dir($widgetSourceAssetPath)) {
            throw new \Exception("Widget's assets folder is not existed");
        }
        $widgetSourceAssetPath = Utility::standardizePathSeparator(
            realpath($widgetSourceAssetPath)
        );
        $this->assetUrl = $this->widget->getReport()->getResourceManager()->publishAssetFolder($widgetSourceAssetPath, $this->widget->version());
    }
public function publish($assetFolder)
    {
        $widgetSourceAssetPath = dirname(Utility::getClassPath($this->widget))
        ."/".$assetFolder;
        
        if (!is_dir($widgetSourceAssetPath)) {
            throw new \Exception("Widget's assets folder is not existed");
        }
        $widgetSourceAssetPath = Utility::standardizePathSeparator(
            realpath($widgetSourceAssetPath)
        );
        $this->assetUrl = $this->widget->getReport()->getResourceManager()->publishAssetFolder($widgetSourceAssetPath, $this->widget->version());
    }
public function publish ( $ assetFolder ) { $ widgetSourceAssetPath = dirname ( Utility :: getClassPath ( $ this -> widget ) ) . "/" . $ assetFolder ; if ( ! is_dir ( $ widgetSourceAssetPath ) ) { throw new \ Exception ( "Widget's assets folder is not existed" ) ; } $ widgetSourceAssetPath = Utility :: standardizePathSeparator ( realpath ( $ widgetSourceAssetPath ) ) ; $ this -> assetUrl = $ this -> widget -> getReport ( ) -> getResourceManager ( ) -> publishAssetFolder ( $ widgetSourceAssetPath , $ this -> widget -> version ( ) ) ; }
Publish an asset folder to public place

It will ask the report resource manager to check if widget resource
folder is available at public place. If not, then the resource manager
will copy local asset folder of widget to public place

@param string $assetFolder The local asset folder of a widget

@return null
Publish an asset folder to public place