PHP Class ChosenHelper

Author: Luke Wilkins ([email protected])
Show file Open project: paulredmond/chosen-cakephp

Public Properties

Property Type Description
$helpers
$settings Settings configured Configure class, ie. Configure::write('Chosen.asset_base', '/path'); take precedence over settings configured through Controller::$helpers property.

Public Methods

Method Description
__construct ( View $view, $settings = [] )
afterRender ( $viewFile )
getDebug ( )
getLoadStatus ( )
getSetting ( $setting )
getSettings ( )
isSupportedFramework ( $val ) : boolean Test if a JS framework is supported by this helper.
loadScripts ( )
select ( $name, $options = [], $attributes = [] ) Chosen select element.

Protected Methods

Method Description
getElement ( $element ) : string Gets the Plugin's element file based on JS framework being used.

Method Details

__construct() public method

public __construct ( View $view, $settings = [] )
$view View

afterRender() public method

public afterRender ( $viewFile )

getDebug() public method

public getDebug ( )

getElement() protected method

Gets the Plugin's element file based on JS framework being used.
protected getElement ( $element ) : string
$element string Name of the plugin element to use.
return string rendered javascript block based on the JS framework element.

getLoadStatus() public method

public getLoadStatus ( )

getSetting() public method

public getSetting ( $setting )

getSettings() public method

public getSettings ( )

isSupportedFramework() public method

Test if a JS framework is supported by this helper.
public isSupportedFramework ( $val ) : boolean
$val The 'framework' setting must use a supported framework.
return boolean

loadScripts() public method

public loadScripts ( )

select() public method

Chosen select element.
public select ( $name, $options = [], $attributes = [] )

Property Details

$helpers public property

public $helpers

$settings public property

Settings configured Configure class, ie. Configure::write('Chosen.asset_base', '/path'); take precedence over settings configured through Controller::$helpers property.
public $settings