Class Document
-
ICanBoogie\Object
implements
ICanBoogie\ToArrayRecursive
uses
ICanBoogie\ToArrayRecursiveTrait,
ICanBoogie\PrototypeTrait
-
Brickrouge\Document
-
Icybee\Document
Methods summary
public static
Icybee\Document
|
#
get( )
Getter hook for the use ICanBoogie\Core::$document property.
Getter hook for the use ICanBoogie\Core::$document property.
Returns
|
public static
|
|
public static
string
|
|
public static
|string
|
#
markup_document_css( array $args, Patron\Engine $engine, mixed $template )
CSS assets can be collected and rendered into LINK elements with
the p:document:css element. The href attribute is used
to add an asset to the collection. The weight attribute specifies
the weight of that asset. If the weight attribute is not specified,
the weight of the asset is defaulted to 100. If the href attribute
is not specified, the assets are rendered. If a template is specified the
collection is passed as this , otherwise the collection is rendered
into an HTML string of LINK elements.
CSS assets can be collected and rendered into LINK elements with
the p:document:css element. The href attribute is used
to add an asset to the collection. The weight attribute specifies
the weight of that asset. If the weight attribute is not specified,
the weight of the asset is defaulted to 100. If the href attribute
is not specified, the assets are rendered. If a template is specified the
collection is passed as this , otherwise the collection is rendered
into an HTML string of LINK elements.
Note: Currently, the element is not rendered right away, a placeholder is
inserted instead and is replaced when the
Icybee\Modules\Pages\PageController::render event is fired.
<p:document:css
href = string
weight = int>
<!-- Content: p:with-params, template? -->
</p:document:css>
Example:
<p:document:css href="/public/page.css" />
<p:document:css href="/public/reset.css" weight="-100" />
<p:document:css />
Produces:
<link href="/public/reset.css" type="text/css" rel="stylesheet" />
<link href="/public/page.css" type="text/css" rel="stylesheet" />
Parameters
- $args
array $args
- $engine
Patron\Engine
$engine
- $template
mixed $template
Returns
|string
|
public static
|string
|
#
markup_document_js( array $args, Patron\Engine $engine, mixed $template )
JavaScript assets can be collected and rendered into SCRIPT
elements with the p:document:js element. The href
attribute is used to add an asset to the collection. The weight
attribute specifies the weight of that asset. If the weight
attribute is not specified, the weight of the asset is defaulted to 100. If the
href attribute is not specified, the assets are rendered. If a
template is specified the collection is passed as this , otherwise
the collection is rendered into an HTML string of SCRIPT
elements.
JavaScript assets can be collected and rendered into SCRIPT
elements with the p:document:js element. The href
attribute is used to add an asset to the collection. The weight
attribute specifies the weight of that asset. If the weight
attribute is not specified, the weight of the asset is defaulted to 100. If the
href attribute is not specified, the assets are rendered. If a
template is specified the collection is passed as this , otherwise
the collection is rendered into an HTML string of SCRIPT
elements.
<p:document:js
href = string
weight = int>
<!-- Content: p:with-params, template? -->
</p:document:js>
Example:
<p:document:js href="/public/page.js" />
<p:document:js href="/public/reset.js" weight="-100" />
<p:document:js />
Produces:
<script src="/public/reset.css" type="text/javascript"></script>
<script src="/public/page.css" type="text/javascript"></script>
Parameters
- $args
array $args
- $engine
Patron\Engine
$engine
- $template
mixed $template
Returns
|string
|
public
|
#
__construct( )
Constructor.
Creates the Javascript and CSS collectors.
Overrides
|
public
mixed
|
#
__get( string $property )
Returns the value of an inaccessible property.
Returns the value of an inaccessible property.
Multiple callbacks are tried in order to retrieve the value of the
property:
get_<property> : Get and return the value of the
property.
lazy_get_<property> : Get, set and return the value of the
property. Because new
properties are created as public the callback is only called once which is
ideal for lazy loading. 3. The prototype is queried for callbacks for the
get_<property> and lazy_get_<property>
methods. 4. Finally, the ICanBoogie\Object::property event is fired
to try and retrieve the value of the property.
Parameters
- $property
string $property
Returns
mixed The value of the inaccessible property.
Throws
PropertyNotReadable when the property has a protected or private scope and no suitable callback
could be found to retrieve its value.
PropertyNotDefined when the property is undefined and there is no suitable callback to retrieve its
values.
Overrides
|
protected
string
|
#
get_css_class( )
Returns the CSS class of the node.
Returns the CSS class of the node.
Returns
string
|
protected
array[string]mixed
|
#
get_css_class_names( )
Returns the CSS class names of the node.
Returns the CSS class names of the node.
Returns
array[string]mixed
|
public
string
|
#
css_class( string|array $modifiers = null )
Return the CSS class of the node.
Return the CSS class of the node.
Parameters
- $modifiers
string|array $modifiers CSS class names modifiers
Returns
string
|
__unset_assets()
,
add_assets()
,
get_assets()
,
resolve_url()
,
set_assets()
from()
,
resolve_facade_properties()
,
resolve_private_properties()
,
to_array()
,
to_json()
to_array_recursive()
to_array_recursive()
__call()
,
__set()
,
__sleep()
,
__wakeup()
,
get_prototype()
,
has_method()
,
has_property()
,
last_chance_get()
,
last_chance_set()
Magic methods summary
Properties summary
$body
,
$css
,
$js
$assets
$prototype