Overview

Namespaces

  • Cakestrap
    • View
      • Helper

Classes

  • AlertHelper
  • AssetHelper
  • BadgeHelper
  • Basic
  • ButtonItemsHelper
  • CakestrapHelper
  • CallOutHelper
  • CollapseHelper
  • DropdownHelper
  • ListGroupHelper
  • ModalHelper
  • PanelHelper
  • TabHelper
  • TableHelper
  • Templates
  • WellHelper
  • Overview
  • Namespace
  • Class

Class AssetHelper

This helper provides methods for generating asset paths. Codes are applicable to layout only.

<?php
//auto render bootstrap styles
 echo $this->Cakestrap->Asset()->style();

//auto render bootstrap scripts
 echo $this->Cakestrap->Asset()->script();
?>
Cake\View\Helper
Extended by Cakestrap\View\Helper\Basic
Extended by Cakestrap\View\Helper\AssetHelper
Namespace: Cakestrap\View\Helper
Package: Cakestrap\View\Helper
Located at AssetHelper.php
Methods summary
public string
# style( array $style = [] )

Build CSS style data from an array of CSS properties.

Build CSS style data from an array of CSS properties.

Parameters

$style

Returns

string
$css Styling data.
public string
# script( array $script = [] )

Build script data from an array of JS properties.

Build script data from an array of JS properties.

Parameters

$script

Returns

string
$script Script data.
public string
# ident( string $classOrId = null )

Create id and class attributes based on controller and action name.

Create id and class attributes based on controller and action name.

Parameters

$classOrId

Returns

string
Methods inherited from Cakestrap\View\Helper\Basic
__call(), _reset(), assignTemplate(), body(), options()
Properties summary
public array $helpers

Asset helpers

Asset helpers

# ['Html']
protected string $_jquery

Url to jquery library without a scheme in order to support http or https.

Url to jquery library without a scheme in order to support http or https.

# '//code.jquery.com/jquery-1.11.3.min.js'
protected array $_autoScript

Automatically set JS script to an specific Bootstrap helpers.

Automatically set JS script to an specific Bootstrap helpers.

# [ 'Alert' => ['alert'], 'Dropdown' => ['dropdown'], 'Modal' => ['modal'], 'Tab' => ['tab'], 'Collapse' => ['collapse', 'transition'], 'NiceCollapse' => ['collapse', 'transition', 'nice-collapse'], 'NiceModal' => ['modal', 'nice-modal'], ]
protected array $_script

An array to handle scripts

An array to handle scripts

# []
protected array $_style

An array to handle styles

An array to handle styles

# []
Properties inherited from Cakestrap\View\Helper\Basic
$_clone, $_contents, $_options, $_stringTemplate, $_template
API documentation generated by ApiGen