PHP Class Arrilot\Widgets\Factories\JavascriptFactory

Show file Open project: arrilot/laravel-widgets Class Usage Examples

Protected Properties

Property Type Description
$ajaxLink string Ajax link where widget can grab content.
$widgetFactory AbstractWidgetFactory Widget factory object.

Public Methods

Method Description
__construct ( AbstractWidgetFactory $widgetFactory )
getContainerId ( ) : string Get the current widget container id.
getLoader ( ) : string Construct javascript code to load the widget.
getReloader ( float | integer $timeout ) : string Construct javascript code to reload the widget.

Protected Methods

Method Description
constructAjaxCall ( ) : string Construct ajax call for loaders.
constructJqueryAjaxCall ( string $url ) : string Construct ajax call with jquery.
constructNativeJsAjaxCall ( string $url ) : string Construct ajax call without jquery.
useJquery ( ) : boolean Determine what to use - jquery or native js.

Method Details

__construct() public method

public __construct ( AbstractWidgetFactory $widgetFactory )
$widgetFactory AbstractWidgetFactory

constructAjaxCall() protected method

Construct ajax call for loaders.
protected constructAjaxCall ( ) : string
return string

constructJqueryAjaxCall() protected method

Construct ajax call with jquery.
protected constructJqueryAjaxCall ( string $url ) : string
$url string
return string

constructNativeJsAjaxCall() protected method

Construct ajax call without jquery.
protected constructNativeJsAjaxCall ( string $url ) : string
$url string
return string

getContainerId() public method

Get the current widget container id.
public getContainerId ( ) : string
return string

getLoader() public method

Construct javascript code to load the widget.
public getLoader ( ) : string
return string

getReloader() public method

Construct javascript code to reload the widget.
public getReloader ( float | integer $timeout ) : string
$timeout float | integer
return string

useJquery() protected method

Determine what to use - jquery or native js.
protected useJquery ( ) : boolean
return boolean

Property Details

$widgetFactory protected property

Widget factory object.
protected AbstractWidgetFactory,Arrilot\Widgets\Factories $widgetFactory
return AbstractWidgetFactory