\Ceo\View\FunctionsPackStylesFunction

Pack a hash of CSS styles into a single attribute.

Use with unpackStyles to manipulate CSS styles.

{% set myStyles = unpackStyles(styleString) %}
{% set myStyles = myStyles|merge({
 'width': '100%',
 'margin': 'auto'
}) %}

<div style="{{ packStyles(myStyles) }}"></div>

Summary

Methods
Properties
Constants
__construct()
getFunctionOptions()
getDI()
getFunctionName()
handle()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() 

getFunctionOptions()

getFunctionOptions() 

getDI()

getDI() 

getFunctionName()

getFunctionName() : string

Return function name

Returns

string

handle()

handle(array  $styles) : string

Accepts a hash from TWIG and returns a style attribute string

Parameters

array $styles

Returns

string