\TokenHelper

TokenHelper

Summary

Methods
Properties
Constants
getToken()
No public properties found
No constants found
_getInputsFields()
_extractToken()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getToken()

getToken(mixed  $model = null, array|string  $actionUrl = null, array  $tokenFields = null, array  $hiddenFields = array(), array  $blacklist = null) : array

Return _Token array.

Parameters

mixed $model

The model name for which the form is being defined. Should include the plugin name for plugin models. e.g. ContactManager.Contact. If an array is passed and $options argument is empty, the array will be used as options. If false no model is used.

array|string $actionUrl

Action url.

array $tokenFields

An array of fields to generate inputs for, or null.

array $hiddenFields

An array of fields that exist in $tokenFields to generate inputs hidden for, or null.

array $blacklist

A array of fields to not create inputs for.

Returns

array —

_Token

_getInputsFields()

_getInputsFields(array  $tokenFields, array  $hiddenFields) : array

Return input fields array added hidden option.

Parameters

array $tokenFields

An array of fields to generate inputs for, or null.

array $hiddenFields

An array of fields that exist in $tokenFields to generate inputs hidden for, or null.

Returns

array —

input fields

_extractToken()

_extractToken(string  $formHtml) : array

Return _Token array.

Parameters

string $formHtml

Token html string

Returns

array —

_Token