PHP Класс Bootstrap\View\Helper\BootstrapHtmlHelper

Наследование: extends Cake\View\Helper\HtmlHelper, use trait BootstrapTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_defaultConfig

Открытые методы

Метод Описание
alert ( $text, $type = null, $options = [] ) Create a Twitter Bootstrap style alert block, containing text.
badge ( $text, $options = [] ) Create a Twitter Bootstrap span badge.
dropdown ( array $menu = [], array $options = [] ) Create & return a twitter bootstrap dropdown menu.
faIcon ( $icon, $options = [] ) Create a font awesome icon.
getCrumbList ( array $options = [], $startText = false ) Get crumb lists in a HTML list, with bootstrap like style.
glIcon ( $icon, $options = [] ) Create a glyphicon icon.
icon ( $icon, $options = [] ) Create a glyphicon or font awesome icon depending on $this->_useFontAwesome.
label ( $text, $type = null, $options = [] ) Create a Twitter Bootstrap span label.
progress ( $widths, $options = [] ) Create a Twitter Bootstrap style progress bar.
splicedRows ( $breakIndex, array $data, callable $determineContent ) : string Create a formatted collection of elements while maintaining proper bootstrappy markup. Useful when displaying, for example, a list of products that would require more than the maximum number of columns per row.
tooltip ( $text, $tooltip, $options = [] ) : The Create a Twitter Bootstrap style tooltip.

Описание методов

alert() публичный Метод

Create a Twitter Bootstrap style alert block, containing text.
public alert ( $text, $type = null, $options = [] )
$text The alert text
$type The type of the alert
$options Options that will be passed to Html::div method The second parameter may either be $type or $options (in this case, the third parameter is useless, and the label type can be specified in the $options array). Available BootstrapHtml options: - type: string, type of alert (default, error, info, success ; useless if $type is specified)

badge() публичный Метод

Create a Twitter Bootstrap span badge.
public badge ( $text, $options = [] )

dropdown() публичный Метод

Create & return a twitter bootstrap dropdown menu.
public dropdown ( array $menu = [], array $options = [] )
$menu array HTML tags corresponding to menu options (which will be wrapped into
  • tag). To add separator, pass 'divider'.
  • $options array Attributes for the wrapper (change it with tag)

    faIcon() публичный Метод

    Create a font awesome icon.
    public faIcon ( $icon, $options = [] )
    $icon Name of the icon.

    getCrumbList() публичный Метод

    Get crumb lists in a HTML list, with bootstrap like style.
    public getCrumbList ( array $options = [], $startText = false )
    $options array Options for list
    $startText Text to insert before list Unusable options: - Separator

    glIcon() публичный Метод

    Create a glyphicon icon.
    public glIcon ( $icon, $options = [] )
    $icon Name of the icon.

    icon() публичный Метод

    Create a glyphicon or font awesome icon depending on $this->_useFontAwesome.
    public icon ( $icon, $options = [] )
    $icon Name of the icon.

    label() публичный Метод

    Create a Twitter Bootstrap span label.
    public label ( $text, $type = null, $options = [] )

    progress() публичный Метод

    Create a Twitter Bootstrap style progress bar.
    public progress ( $widths, $options = [] )
    $widths - The width (in %) of the bar (style primary, without display) - An array of bar, with (for each bar) : - width (only field required) - type (primary, info, danger, success, warning, default is primary) - min (integer, default 0) - max (integer, default 100) - display (boolean, default false, for text display)
    $options Options that will be passed to Html::div method (only for main div) If $widths is only a integer (first case), $options may contains value for the fields specified above. Available BootstrapHtml options: - striped: boolean, specify if progress bar should be striped - active: boolean, specify if progress bar should be active

    splicedRows() публичный Метод

    Create a formatted collection of elements while maintaining proper bootstrappy markup. Useful when displaying, for example, a list of products that would require more than the maximum number of columns per row.
    public splicedRows ( $breakIndex, array $data, callable $determineContent ) : string
    $breakIndex int|string divisible index that will trigger a new row
    $data array array collection of data used to render each column
    $determineContent callable callable a callback that will be called with the data required to render an individual column
    Результат string

    tooltip() публичный Метод

    Create a Twitter Bootstrap style tooltip.
    public tooltip ( $text, $tooltip, $options = [] ) : The
    $text The HTML tag inner text.
    $tooltip The tooltip text.
    $options
    Результат The text wrapped in the specified tag with a tooltip.

    Описание свойств

    $_defaultConfig защищенное свойство

    protected $_defaultConfig