YiiFoundation
  • Namespace
  • Class
  • Tree

Namespaces

  • foundation
    • enum
    • exception
    • helpers
    • widgets
      • base
  • PHP

Classes

  • Alert
  • ArrayHelper
  • Button
  • Foundation
  • Html
  • Icon
  • Nav
  • Panel
  • Pricing
  • Progress
  • Typo

Class Html

Html holds those modified methods from CHtml required for Foundation helpers and/or widgets.

Namespace: foundation\helpers
Package: foundation\helpers
Author: Antonio Ramirez <amigo.cobos@gmail.com>
Located at helpers/Html.php

Methods summary

public static
# clientChange( string $event, array & $htmlOptions )

Generates the JavaScript with the specified client changes.

Generates the JavaScript with the specified client changes.

Parameters

$event
string
$event event name (without 'on')
$htmlOptions
array
$htmlOptions HTML attributes which may contain the following special attributes specifying the client change behaviors:
  • submit: string, specifies the URL to submit to. If the current element has a parent form, that form will be submitted, and if 'submit' is non-empty its value will replace the form's URL. If there is no parent form the data listed in 'params' will be submitted instead (via POST method), to the URL in 'submit' or the currently requested URL if 'submit' is empty. Please note that if the 'csrf' setting is true, the CSRF token will be included in the params too.
  • params: array, name-value pairs that should be submitted together with the form. This is only used when 'submit' option is specified.
  • csrf: boolean, whether a CSRF token should be automatically included in 'params' when CHttpRequest::enableCsrfValidation is true. Defaults to false. You may want to set this to be true if there is no enclosing form around this element. This option is meaningful only when 'submit' option is set.
  • return: boolean, the return value of the javascript. Defaults to false, meaning that the execution of javascript would not cause the default behavior of the event.
  • confirm: string, specifies the message that should show in a pop-up confirmation dialog.
  • ajax: array, specifies the AJAX options (see ajax).
  • live: boolean, whether the event handler should be delegated or directly bound. If not set, foundation\helpers\Html::$liveEvents will be used. This option has been available since version 1.1.11.

See

http://www.yiiframework.com/doc/api/1.1/CHtml/#clientChange-detail
public static string
# thumb( mixed $src, string $url = '#', array $htmlOptions = array() )

Renders a Foundation thumbnail

Renders a Foundation thumbnail

Parameters

$src
mixed
$src
$url
string
$url
$htmlOptions
array
$htmlOptions

Returns

string
public static
# addCssClass( array & $options, string $class )

Adds a CSS class to the specified options. If the CSS class is already in the options, it will not be added again.

Adds a CSS class to the specified options. If the CSS class is already in the options, it will not be added again.

Parameters

$options
array
$options the options to be modified.
$class
string
$class the CSS class to be added

Magic methods summary

Properties summary

public static integer $count
#

the counter for generating automatic input field names.

the counter for generating automatic input field names.

public static boolean $liveEvents
#

Sets the default style for attaching jQuery event handlers.

Sets the default style for attaching jQuery event handlers.

If set to true (default), event handlers are delegated. Event handlers are attached to the document body and can process events from descendant elements that are added to the document at a later time.

If set to false, event handlers are directly bound. Event handlers are attached directly to the DOM element, that must already exist on the page. Elements injected into the page at a later time will not be processed.

You can override this setting for a particular element by setting the htmlOptions delegate attribute (see foundation\helpers\Html::clientChange()).

For more information about attaching jQuery event handler see http://api.jquery.com/on/

See

http://www.yiiframework.com/doc/api/1.1/CHtml/#clientChange-detail
foundation\helpers\Html::clientChange()
YiiFoundation API documentation generated by ApiGen 2.8.0