Method |
Description |
|
__clone ( ) |
For safety, you can't clone views. Use $view->newInstance instead. |
|
_tsBuffer ( $t, $data ) |
|
|
defaultSpot ( ) : string |
Normally when you add a view, it's output is placed inside
tag of its parent view. You can specify a different tag as 3rd argument
for the add() method. If you wish for object to use different tag by
default, you can override this method. |
|
defaultTemplate ( ) : string |
This method is commonly redefined to set a default template for an object. |
|
getHTML ( boolean $destroy = true, boolean $execute_js = true ) : string |
Converting View into string will render recursively and produce HTML. |
|
getJSID ( ) : string |
|
|
initTemplateTags ( ) |
This method is called to automatically fill in some of the tags in this
view. Normally the call is bassed to $app->setTags(), however you can
extend and add more tags to fill. |
|
initializeTemplate ( string $template_spot = null, string | array $template_branch = null ) : AbstractView |
Called automatically during init for template initalization. |
|
js ( string | boolean | null $when = null, array | jQuery_Chain | string $code = null, string $instance = null ) : jQuery_Chain |
Views in Agile Toolkit can assign javascript actions to themselves. This
is done by calling $view->js() method. |
|
modelRender ( ) |
When model is specified for a view, values of the model is
inserted inside the template if corresponding tags exist. |
|
moveJStoParent ( ) |
Append our chains to owner's chains. JS chains bubble up to
app, which plugs them into template. If the object is being
"cut" then only relevant chains will be outputed. |
|
on ( $event, $selector = null, $js = null ) |
Views in Agile Toolkit can assign javascript actions to themselves. This
is done by calling $view->js() or $view->on(). |
|
output ( string $txt ) |
Low level output function which append's to the parent object's
template. For normal objects, you simply need to specify a suitable
template. |
|
recursiveRender ( ) |
Recursively renders all views. Calls render() for all or for the one
being cut. In some cases you may want to redefine this function instead
of render(). The difference is that this function is called before
sub-views are rendered, but render() is called after. |
|
region_render ( ) |
When "cut"-ing using cut_region we need to output only a specified
tag. This method of cutting is mostly un-used now, and should be
considered obsolete. |
|
render ( ) |
Default rendering method. Generates HTML presentation of $this view. |
|
setModel ( object | string $model, array | string | null $actual_fields = UNDEFINED ) : AbstractModel |
Associate view with a model. Additionally may initialize a controller
which would copy fields from the model into the View. |
|