Property | Type | Description | |
---|---|---|---|
$helpers | array | List of helpers used by this helper | |
$response | Reference to the Response object |
Property | Type | Description | |
---|---|---|---|
$_crumbs | array | Breadcrumbs. | |
$_defaultConfig | array | Default config for this class | |
$_docTypes | array | Document type definitions | |
$_includedAssets | array | Names of script & css files that have been included once | |
$_scriptBlockOptions | array | Options for the currently opened script block buffer if any. |
Method | Description | |
---|---|---|
__construct ( Cake\View\View $View, array $config = [] ) | Constructor | |
addCrumb ( string $name, string | array | null $link = null, array $options = [] ) | Adds a link to the breadcrumbs array. | |
charset ( string | null $charset = null ) : string | Returns a charset META-tag. | |
css ( string | array $path, array $options = [] ) : string | null | Creates a link element for CSS stylesheets. | |
div ( string | null $class = null, string | null $text = null, array $options = [] ) : string | Returns a formatted DIV tag for HTML FORMs. | |
docType ( string $type = 'html5' ) : string | null | Returns a doctype string. | |
getCrumbList ( array $options = [], string | array | boolean $startText = false ) : string | null | Returns breadcrumbs as a (x)html list | |
getCrumbs ( string $separator = '»', string | array | boolean $startText = false ) : string | null | Returns the breadcrumb trail as a sequence of »-separated links. | |
image ( string $path, array $options = [] ) : string | Creates a formatted IMG element. | |
implementedEvents ( ) : array | Event listeners. | |
link ( string $title, string | array | null $url = null, array $options = [] ) : string | Creates an HTML link. | |
media ( string | array $path, array $options = [] ) : string | Returns an audio/video element | |
meta ( string | array $type, string | array | null $content = null, array $options = [] ) : string | Creates a link to an external resource and handles basic meta tags | |
nestedList ( array $list, array $options = [], array $itemOptions = [] ) : string | Build a nested list (UL/OL) out of an associative array. | |
para ( string $class, string $text, array $options = [] ) : string | Returns a formatted P tag. | |
script ( string | array $url, array $options = [] ) : string | null | Returns one or many tags depending on the number of scripts given. | |
scriptBlock ( string $script, array $options = [] ) : string | null | Wrap $script in a script tag. | |
scriptEnd ( ) : string | null | End a Buffered section of JavaScript capturing. | |
scriptStart ( array $options = [] ) : void | Begin a script block that captures output until HtmlHelper::scriptEnd() is called. This capturing block will capture all output between the methods and create a scriptBlock from it. | |
style ( array $data, boolean $oneLine = true ) : string | Builds CSS style data from an array of CSS properties | |
tableCell ( string $content, array $options = [] ) : string | Renders a single table cell (A TD with attributes). | |
tableCells ( array | string $data, array | boolean | null $oddTrOptions = null, array | boolean | null $evenTrOptions = null, boolean $useCount = false, boolean $continueOddEven = true ) : string | Returns a formatted string of table rows (TR's with TD's in them). | |
tableHeaders ( array $names, array $trOptions = null, array $thOptions = null ) : string | Returns a row of formatted and named TABLE headers. | |
tableRow ( string $content, array $options = [] ) : string | Renders a single table row (A TR with attributes). | |
tag ( string $name, string | null $text = null, array $options = [] ) : string | Returns a formatted block tag, i.e DIV, SPAN, P. |
Method | Description | |
---|---|---|
_nestedListItem ( array $items, array $options, array $itemOptions ) : string | Internal function to build a nested list (UL/OL) out of an associative array. | |
_prepareCrumbs ( string | array | boolean $startText, boolean $escape = true ) : array | Prepends startText to crumbs array if set | |
_renderCells ( array $line, boolean $useCount = false ) : string | Renders cells for a row of a table. |
public __construct ( Cake\View\View $View, array $config = [] ) | ||
$View | Cake\View\View | The View this helper is being attached to. |
$config | array | Configuration settings for the helper. |
protected _nestedListItem ( array $items, array $options, array $itemOptions ) : string | ||
$items | array | Set of elements to list. |
$options | array | Additional HTML attributes of the list (ol/ul) tag. |
$itemOptions | array | Options and additional HTML attributes of the list item (LI) tag. |
return | string | The nested list element |
public css ( string | array $path, array $options = [] ) : string | null | ||
$path | string | array | 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. |
$options | array | Array of options and HTML arguments. |
return | string | null | CSS `` or `` tag, depending on the type of link. |
public div ( string | null $class = null, string | null $text = null, array $options = [] ) : string | ||
$class | string | null | CSS class name of the div element. |
$text | string | null | String content that will appear inside the div element. If null, only a start tag will be printed |
$options | array | Additional HTML attributes of the DIV tag |
return | string | The formatted DIV element |
public getCrumbList ( array $options = [], string | array | boolean $startText = false ) : string | null | ||
$options | array | Array of HTML attributes to apply to the generated list elements. |
$startText | string | array | boolean | This will be the first crumb, if false it defaults to first crumb in array. Can also be an array, see `HtmlHelper::getCrumbs` for details. |
return | string | null | Breadcrumbs HTML list. |
public getCrumbs ( string $separator = '»', string | array | boolean $startText = false ) : string | null | ||
$separator | string | Text to separate crumbs. |
$startText | string | array | boolean | This will be the first crumb, if false it defaults to first crumb in array. Can also be an array, see above for details. |
return | string | null | Composed bread crumbs |
public implementedEvents ( ) : array | ||
return | array |
public link ( string $title, string | array | null $url = null, array $options = [] ) : string | ||
$title | string | The content to be wrapped by `` tags. |
$url | string | array | null | Cake-relative URL or array of URL parameters, or external URL (starts with http://) |
$options | array | Array of options and HTML attributes. |
return | string | An `` element. |
public media ( string | array $path, array $options = [] ) : string | ||
$path | string | array | Path to the video file, relative to the webroot/{$options['pathPrefix']} directory. Or an array where each item itself can be a path string or an associate array containing keys `src` and `type` |
$options | array | Array of HTML attributes, and special options above. |
return | string | Generated media element |
public meta ( string | array $type, string | array | null $content = null, array $options = [] ) : string | ||
$type | string | array | The title of the external resource |
$content | string | array | null | The address of the external resource or string for content attribute |
$options | array | Other attributes for the generated tag. If the type attribute is html, rss, atom, or icon, the mime-type is returned. |
return | string | A completed `` element. |
public nestedList ( array $list, array $options = [], array $itemOptions = [] ) : string | ||
$list | array | Set of elements to list |
$options | array | Options and additional HTML attributes of the list (ol/ul) tag. |
$itemOptions | array | Options and additional HTML attributes of the list item (LI) tag. |
return | string | The nested list |
public script ( string | array $url, array $options = [] ) : string | null | ||
$url | string | array | String or array of javascript files to include |
$options | array | Array of options, and html attributes see above. |
return | string | null | String of `` tags or null if block is specified in options or if $once is true and the file has been included before. |
public scriptStart ( array $options = [] ) : void | ||
$options | array | Options for the code block. |
return | void |
public tableCells ( array | string $data, array | boolean | null $oddTrOptions = null, array | boolean | null $evenTrOptions = null, boolean $useCount = false, boolean $continueOddEven = true ) : string | ||
$data | array | string | Array of table data |
$oddTrOptions | array | boolean | null | HTML options for odd TR elements if true useCount is used |
$evenTrOptions | array | boolean | null | HTML options for even TR elements |
$useCount | boolean | adds class "column-$i" |
$continueOddEven | boolean | If false, will use a non-static $count variable, so that the odd/even count is reset to zero just for that call. |
return | string | Formatted HTML |
public tableHeaders ( array $names, array $trOptions = null, array $thOptions = null ) : string | ||
$names | array | Array of tablenames. Each tablename also can be a key that points to an array with a set of attributes to its specific tag |
$trOptions | array | HTML options for TR elements. |
$thOptions | array | HTML options for TH elements. |
return | string | Completed table headers |
public tag ( string $name, string | null $text = null, array $options = [] ) : string | ||
$name | string | Tag name. |
$text | string | null | String content that will appear inside the div element. If null, only a start tag will be printed |
$options | array | Additional HTML attributes of the DIV tag, see above. |
return | string | The formatted tag element |
protected array $_defaultConfig | ||
return | array |
protected array $_includedAssets | ||
return | array |
protected array $_scriptBlockOptions | ||
return | array |