\SingletonViewBlockHtmlHelper

SingletonViewBlockHtmlHelper

Summary

Methods
Properties
Constants
__construct()
meta()
css()
script()
scriptBlock()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__copyBlockValue()
$__staticViewBlock
$__staticIncludedAssets
N/A

Properties

$__staticViewBlock

$__staticViewBlock : \View

The same ViewBlock instance this helper is attached to

Type

\View

$__staticIncludedAssets

$__staticIncludedAssets : array

Names of script & css files that have been included once If CakePHP less than 2.6.0, css is not implemented

Type

array

Methods

__construct()

__construct(\View  $View, array  $settings = array()) 

Constructor

Set static View instance and _includedAssets property after parent::__construct

Parameters

\View $View

The View this helper is being attached to.

array $settings

Configuration settings for the helper.

meta()

meta(string  $type, string|array  $url = null, array  $options = array()) : string

View object changed to static View instance for used same BlockView instance

Parameters

string $type

The title of the external resource

string|array $url

The address of the external resource or string for content attribute

array $options

Other attributes for the generated tag. If the type attribute is html, rss, atom, or icon, the mime-type is returned.

Returns

string —

A completed <link /> element.

css()

css(string|array  $path, array  $options = array()) : string

View object changed to static View instance for used same BlockView instance

Parameters

string|array $path

The name of a CSS style sheet or an array containing names of CSS stylesheets. If $path is prefixed with '/', the path will be relative to the webroot of your application. Otherwise, the path will be relative to your CSS path, usually webroot/css.

array $options

Array of options and HTML arguments.

Returns

string —

CSS or