PHP Class Arrilot\Widgets\Factories\AbstractWidgetFactory

Afficher le fichier Open project: arrilot/laravel-widgets Class Usage Examples

Méthodes publiques

Свойство Type Description
$app ApplicationWrapperContract; Laravel application wrapper for better testability.
$skipWidgetContainer boolean The flag for not wrapping content in a special container.
$widgetFullParams array Array of widget parameters including the first one (config).
$widgetName string The name of the widget being called.
$widgetParams array Array of widget parameters excluding the first one (config).

Protected Properties

Свойство Type Description
$javascriptFactory JavascriptFactory Another factory that produces some javascript.
$widget Arrilot\Widgets\AbstractWidget Widget object to work with.
$widgetConfig array Widget configuration array.

Méthodes publiques

Méthode Description
__call ( string $widgetName, array $params = [] ) : mixed Magic method that catches all widget calls.
__construct ( Arrilot\Widgets\Contracts\ApplicationWrapperContract $app ) Constructor.
decryptWidgetParams ( string $params ) : array Decrypt widget params that were transported via HTTP.
encryptWidgetParams ( array $params ) : string Encrypt widget params to be transported via HTTP.

Méthodes protégées

Méthode Description
instantiateWidget ( array $params = [] ) Set class properties and instantiate a widget object.
parseFullWidgetNameFromString ( $widgetName ) : string Convert stuff like 'profile.feedWidget' to 'Profile\FeedWidget'.
wrapContentInContainer ( $content ) : string Wrap the given content in a container if it's not an ajax call.

Method Details

__call() public méthode

Magic method that catches all widget calls.
public __call ( string $widgetName, array $params = [] ) : mixed
$widgetName string
$params array
Résultat mixed

__construct() public méthode

Constructor.
public __construct ( Arrilot\Widgets\Contracts\ApplicationWrapperContract $app )
$app Arrilot\Widgets\Contracts\ApplicationWrapperContract

decryptWidgetParams() public méthode

Decrypt widget params that were transported via HTTP.
public decryptWidgetParams ( string $params ) : array
$params string
Résultat array

encryptWidgetParams() public méthode

Encrypt widget params to be transported via HTTP.
public encryptWidgetParams ( array $params ) : string
$params array
Résultat string

instantiateWidget() protected méthode

Set class properties and instantiate a widget object.
protected instantiateWidget ( array $params = [] )
$params array

parseFullWidgetNameFromString() protected méthode

Convert stuff like 'profile.feedWidget' to 'Profile\FeedWidget'.
protected parseFullWidgetNameFromString ( $widgetName ) : string
$widgetName
Résultat string

wrapContentInContainer() protected méthode

Wrap the given content in a container if it's not an ajax call.
protected wrapContentInContainer ( $content ) : string
$content
Résultat string

Property Details

$app public_oe property

Laravel application wrapper for better testability.
public ApplicationWrapperContract; $app
Résultat ApplicationWrapperContract;

$javascriptFactory protected_oe property

Another factory that produces some javascript.
protected JavascriptFactory,Arrilot\Widgets\Factories $javascriptFactory
Résultat JavascriptFactory

$skipWidgetContainer public_oe static_oe property

The flag for not wrapping content in a special container.
public static bool $skipWidgetContainer
Résultat boolean

$widget protected_oe property

Widget object to work with.
protected AbstractWidget,Arrilot\Widgets $widget
Résultat Arrilot\Widgets\AbstractWidget

$widgetConfig protected_oe property

Widget configuration array.
protected array $widgetConfig
Résultat array

$widgetFullParams public_oe property

Array of widget parameters including the first one (config).
public array $widgetFullParams
Résultat array

$widgetName public_oe property

The name of the widget being called.
public string $widgetName
Résultat string

$widgetParams public_oe property

Array of widget parameters excluding the first one (config).
public array $widgetParams
Résultat array