Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
Cake
View
Helper
FormHelper
addWidget
Cake\View\Helper\FormHelper::addWidget PHP Method
FormHelper Class Documentation
Show file
Open project: cakephp/cakephp
addWidget()
public
method
Allows you to add or replace widget instances with custom code.
public
addWidget
(
string
$name
,
array
| Cake\View\Widget\WidgetInterface
$spec
) :
void
$name
string
The name of the widget. e.g. 'text'.
$spec
array
| Cake\View\Widget\WidgetInterface
Either a string class name or an object implementing the WidgetInterface.
return
void
public function addWidget($name, $spec) { $this->_registry->add([$name => $spec]); }
FormHelper
__call
__construct
_addDefaultContextProviders
_csrfField
_datetimeOptions
_extractOption
_formUrl
_getContext
_getInput
_getLabel
_groupTemplate
_initInputField
_inputContainerTemplate
_inputLabel
_inputType
_isRequiredField
_lastAction
_magicOptions
_optionsOptions
_parseOptions
_secure
_secureFieldName
_singleDatetime
addContextProvider
addWidget
allInputs
button
checkbox
context
create
date
dateTime
day
end
error
fieldset
file
hidden
hour
implementedEvents
input
inputs
isFieldError
label
meridian
minute
month
multiCheckbox
postButton
postLink
radio
resetTemplates
secure
select
submit
textarea
time
unlockField
widget
widgetRegistry
year