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 Foundation

Foundation helper contains functions to work with the core assets.

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

Methods summary

public static
# register( mixed $useZepto = false, mixed $ie8Support = false )

Registers all core css and js scripts for foundation

Registers all core css and js scripts for foundation

public static
# registerCoreScripts( boolean $useZepto = false, boolean $minimized = true, integer $position = \CClientScript::POS_END )

Registers jQuery and Foundation JavaScript.

Registers jQuery and Foundation JavaScript.

Parameters

$useZepto
boolean
$useZepto whether to use zepto or not
$minimized
boolean
$minimized whether to register full minimized library or not
$position
integer
$position the position to register the core script
public static boolean
# isCoreRegistered( boolean $minimized = true, integer $position = \CClientScript::POS_END )

Checks whether the core script has been registered or not

Checks whether the core script has been registered or not

Parameters

$minimized
boolean
$minimized whether to check full minimized library or not
$position
integer
$position the position to register the core script

Returns

boolean
public static
# registerFonts( mixed $fonts = array() )

Registers foundation fonts

Registers foundation fonts

Parameters

$fonts
mixed
$fonts the array or string name to register.
public static
# registerCoreCss( )

Registers the Foundation CSS.

Registers the Foundation CSS.

public static string
# getAssetsUrl( boolean $forceCopyAssets = false, boolean $cdn = false )

Returns the url to the published assets folder.

Returns the url to the published assets folder.

Parameters

$forceCopyAssets
boolean
$forceCopyAssets whether to force assets registration or not
$cdn
boolean
$cdn whether to use CDN version or not

Returns

string
the url.
public static mixed
# getAssetsPath( )

Returns the full path of foundation assets

Returns the full path of foundation assets

Returns

mixed
the full path
public static
# registerPlugin( string $name, string $selector, array $options = array(), integer $position = \CClientScript::POS_READY )

Registers a specific plugin using the given selector and options.

Registers a specific plugin using the given selector and options.

Parameters

$name
string
$name the plugin name.
$selector
string
$selector the CSS selector.
$options
array
$options the JavaScript options for the plugin.
$position
integer
$position the position of the JavaScript code.
public static
# registerScriptFile( string $asset, integer $position = \CClientScript::POS_END )

Registers a specific js assets file

Registers a specific js assets file

Parameters

$asset
string
$asset the assets file (ie 'foundation/foundation.abide.js'
$position
integer
$position the position where the script should be registered on the page
public static
# registerEvents( string $selector, string[] $events, integer $position = \CClientScript::POS_READY )

Registers events using the given selector.

Registers events using the given selector.

Parameters

$selector
string
$selector the CSS selector.
$events
string[]
$events the JavaScript event configuration (name=>handler).
$position
integer
$position the position of the JavaScript code.
public static string
# getUniqueScriptId( )

Generates a "somewhat" random id string.

Generates a "somewhat" random id string.

Returns

string
the id
public static
# registerBlockGridIeSupport( integer $position = \CClientScript::POS_END )

Registers block-grid support for ie8 if set by its ie8Support attribute.

Registers block-grid support for ie8 if set by its ie8Support attribute.

Parameters

$position
integer
$position the position to render the script

Magic methods summary

Properties summary

protected static string $assetsUrl
#

holds the url of Foundation's assets folder

holds the url of Foundation's assets folder

YiiFoundation API documentation generated by ApiGen 2.8.0