PHP Class jQuery, atk4

Show file Open project: atk4/atk4 Class Usage Examples

Public Properties

Property Type Description
$app App_Web
$chain_class Name of jQuery_Chain class
$included array

Public Methods

Method Description
addInclude ( string $file, string $ext = '.js' ) Locate javascript file and add it to HTML's head section.
addOnReady ( jQuery_Chain | string $js ) Add custom code into onReady section. Will be executed under $(function(){ .
addStaticInclude ( string $file, string $ext = '.js' ) Adds static includes
addStaticStylesheet ( string $file, string $ext = '.css', string $locate = 'css' ) Adds static stylesheet
addStylesheet ( string $file, string $ext = '.css', string $locate = 'css' ) Locate stylesheet file and add it to HTML's head section.
chain ( AbstractObject $object ) : jQuery_Chain [private] use $object->js() instead.
cutRender ( ) [private] When partial render is done, this function includes JS for rendered region.
getJS ( AbstractView $obj ) : string [private] Collect JavaScript chains from specified object and add them into onReady section.
init ( ) Initialization
postRender ( ) [private] .

Method Details

addInclude() public method

Locate javascript file and add it to HTML's head section.
public addInclude ( string $file, string $ext = '.js' )
$file string
$ext string

addOnReady() public method

. })
public addOnReady ( jQuery_Chain | string $js )
$js jQuery_Chain | string

addStaticInclude() public method

Adds static includes
public addStaticInclude ( string $file, string $ext = '.js' )
$file string
$ext string

addStaticStylesheet() public method

Adds static stylesheet
public addStaticStylesheet ( string $file, string $ext = '.css', string $locate = 'css' )
$file string
$ext string
$locate string

addStylesheet() public method

Locate stylesheet file and add it to HTML's head section.
public addStylesheet ( string $file, string $ext = '.css', string $locate = 'css' )
$file string
$ext string
$locate string

chain() public method

[private] use $object->js() instead.
public chain ( AbstractObject $object ) : jQuery_Chain
$object AbstractObject
return jQuery_Chain

cutRender() public method

[private] When partial render is done, this function includes JS for rendered region.
public cutRender ( )

getJS() public method

[private] Collect JavaScript chains from specified object and add them into onReady section.
public getJS ( AbstractView $obj ) : string
$obj AbstractView
return string

init() public method

Initialization
public init ( )

postRender() public method

. ?
public postRender ( )

Property Details

$app public property

public App_Web $app
return App_Web

$chain_class public property

Name of jQuery_Chain class
public $chain_class

$included public property

public array $included
return array