Class Javascript
Javascript Helper, requires Html Helper
Facilitates rendering/loading javascript into a view
-
Html
-
Javascript
Methods summary
public
|
#
__construct( string $default_path = null )
Constructs a Javascript Helper
Constructs a Javascript Helper
Parameters
- $default_path
string $default_path The default path to use for javascript files
|
public
string
|
#
setDefaultPath( string $default_path )
Sets the default path to use for all javascript requests
Sets the default path to use for all javascript requests
Parameters
- $default_path
string $default_path The default path to use for javascript files
Returns
string The previous default path
|
public
string
|
#
getFiles( string $location )
Return the HTML used to create the script tags and load the set
javascript
Return the HTML used to create the script tags and load the set
javascript
Parameters
- $location
string $location The location where the script resides (generally "head" or "body")
Returns
string The HTML used to load all of the set javascript files
|
public
string
|
#
getInline( )
Return the HTML used to create the inline javascript
Return the HTML used to create the inline javascript
Returns
string The HTML used to load all of the set inline javascript
|
public
Javascript
|
#
setFile( string $file, string $location = "head", string $path = null, mixed $condition = null, mixed $hidden = true )
Sets the given javascript file into the structure view
Sets the given javascript file into the structure view
Parameters
- $file
string $file The name of the javascript file to load
- $location
string $location The location to set the given file (genearlly "head" or "body")
- $path
string $path The path to the javascript file, if null will use the default path set in
the constructor
- $condition
- $hidden
Returns
|
public
Javascript
|
#
setInline( string $data, mixed $condition = null, mixed $hidden = true )
Sets the given javascript data to be appended to the list of javascript
data.
Sets the given javascript data to be appended to the list of javascript
data.
Parameters
- $data
string $data The javascript data to set
- $condition
- $hidden
Returns
|
public
Javascript
|
#
unsetFiles( )
Unset all files that are currently set
Unset all files that are currently set
Returns
|
public
Javascript
|
#
unsetInline( )
Unset all inline data that is currently set
Unset all inline data that is currently set
Returns
|
Methods inherited from Html
_()
,
addCondition()
,
buildAttributes()
,
concat()
,
hyperlink()
,
ifSet()
,
isUtf8()
,
safe()
Magic methods summary
Properties summary
Properties inherited from Html
$xhtml