PHP Class Arrilot\Widgets\AbstractWidget

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

Public Properties

Property Type Description
$cacheTime integer | float | boolean False means no caching at all.
$reloadTimeout integer | float | boolean False means no reload at all.

Protected Properties

Property Type Description
$config array The configuration array.

Public Methods

Method Description
__construct ( array $config = [] ) Constructor.
cacheKey ( array $params = [] ) : string Cache key that is used if caching is enabled.
container ( ) : array Async and reloadable widgets are wrapped in container.
placeholder ( ) : string Placeholder for async widget.

Protected Methods

Method Description
addConfigDefaults ( array $defaults ) Add defaults to configuration array.

Method Details

__construct() public method

Constructor.
public __construct ( array $config = [] )
$config array

addConfigDefaults() protected method

Add defaults to configuration array.
protected addConfigDefaults ( array $defaults )
$defaults array

cacheKey() public method

Cache key that is used if caching is enabled.
public cacheKey ( array $params = [] ) : string
$params array
return string

container() public method

You can customize it by overriding this method.
public container ( ) : array
return array

placeholder() public method

You can customize it by overwriting this method.
public placeholder ( ) : string
return string

Property Details

$cacheTime public property

False means no caching at all.
public int|float|bool $cacheTime
return integer | float | boolean

$config protected property

The configuration array.
protected array $config
return array

$reloadTimeout public property

False means no reload at all.
public int|float|bool $reloadTimeout
return integer | float | boolean