Trait IdGeneratorTrait

A trait that provides id generating methods to be used in various widget classes.

Direct Known Users

Cake\View\Helper\FormHelper, Cake\View\Widget\MultiCheckboxWidget, Cake\View\Widget\RadioWidget

Method Detail

_clearIdssource protected

_clearIds( )

Clear the stored ID suffixes.

_domIdsource protected

_domId( string $value )

Generate an ID suitable for use in an ID attribute.

Parameters

string $value
The value to convert into an ID.

Returns

string
The generated id.

_idsource protected

_id( string $name , string $val )

Generate an ID attribute for an element.

Ensures that id's for a given set of fields are unique.

Parameters

string $name
The ID attribute name.
string $val
The ID attribute value.

Returns

string
Generated id.

Properties summary

$_idPrefixsource

protected string

Prefix for id attribute.

null

$_idSuffixessource

protected array

A list of id suffixes used in the current rendering.

[]

© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/3.1/class-Cake.View.Helper.IdGeneratorTrait.html