PHP Класс Former\Form\Group

Наследование: extends HtmlObject\Traits\Tag
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$openGroup Former\Form\Group The custom group that is open
$opened boolean Whether a custom group is opened or not

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

Свойство Тип Описание
$app Illuminate\Container\Container The Container
$append array An array of elements to append the field
$element string The group's element
$help array The group help
$label HtmlObject\Element The group label
$prepend array An array of elements to preprend the field
$raw boolean Whether the field should be displayed raw or not
$state string The current state of the group
$validations array The field validations to be checked for errors

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

Метод Описание
__construct ( Illuminate\Container\Container $app, string $label, $validations = null ) Creates a group
__toString ( ) : string Prints out the opening of the Control Group
addGroupClass ( string $class ) Set a class on the Group
append ( ) Append elements to the field
appendIcon ( string $icon, array $attributes = [], $iconSettings = [] ) Append an icon to a field
blockHelp ( string $help, array $attributes = [] ) Add an block help
contents ( string $contents ) : string Set the contents of the current group
getErrors ( ) : string Get the errors for the group
getFormattedLabel ( ) : string | null Get the formatted group label
help ( string $help, array $attributes = [] ) Alias for inlineHelp
inlineHelp ( string $help, array $attributes = [] ) Add an inline help
isRaw ( ) : boolean Check if the current group is to be displayed or not
open ( ) : string Opens a group
prepend ( ) Prepend elements to the field
prependIcon ( string $icon, array $attributes = [], $iconSettings = [] ) Prepends an icon to a field
raw ( ) Disables the control group for the current field
setLabel ( string $label ) Adds a label to the group
state ( string $state ) Set the state of the group
wrap ( string $contents, string $label = null ) : string Wraps content in a group
wrapField ( Field $field ) : string Wrap a Field with the current group

Защищенные методы

Метод Описание
getHelp ( ) : string Prints out the current help
getLabel ( string $field = null ) : string Prints out the current label
placeAround ( array $items, string $place ) Place elements around the field
prependAppend ( Field $field ) : string Format the field with prepended/appended elements

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

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

Creates a group
public __construct ( Illuminate\Container\Container $app, string $label, $validations = null )
$app Illuminate\Container\Container
$label string Its label

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

Prints out the opening of the Control Group
public __toString ( ) : string
Результат string A control group opening tag

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

Set a class on the Group
public addGroupClass ( string $class )
$class string The class to add

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

Append elements to the field
public append ( )

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

Append an icon to a field
public appendIcon ( string $icon, array $attributes = [], $iconSettings = [] )
$icon string The icon to prepend
$attributes array Its attributes

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

Add an block help
public blockHelp ( string $help, array $attributes = [] )
$help string The help text
$attributes array Facultative attributes

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

Set the contents of the current group
public contents ( string $contents ) : string
$contents string The group contents
Результат string A group

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

Get the errors for the group
public getErrors ( ) : string
Результат string

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

Get the formatted group label
public getFormattedLabel ( ) : string | null
Результат string | null

getHelp() защищенный Метод

Prints out the current help
protected getHelp ( ) : string
Результат string A .help-block or .help-inline

getLabel() защищенный Метод

Prints out the current label
protected getLabel ( string $field = null ) : string
$field string The field to create a label for
Результат string A

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

Alias for inlineHelp
public help ( string $help, array $attributes = [] )
$help string The help text
$attributes array Facultative attributes

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

Add an inline help
public inlineHelp ( string $help, array $attributes = [] )
$help string The help text
$attributes array Facultative attributes

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

Check if the current group is to be displayed or not
public isRaw ( ) : boolean
Результат boolean

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

Opens a group
public open ( ) : string
Результат string Opening tag

placeAround() защищенный Метод

Place elements around the field
protected placeAround ( array $items, string $place )
$items array An array of items to place
$place string Where they should end up (prepend|append)

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

Prepend elements to the field
public prepend ( )

prependAppend() защищенный Метод

Format the field with prepended/appended elements
protected prependAppend ( Field $field ) : string
$field Field The field to format
Результат string Field plus supplementary elements

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

Prepends an icon to a field
public prependIcon ( string $icon, array $attributes = [], $iconSettings = [] )
$icon string The icon to prepend
$attributes array Its attributes

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

Disables the control group for the current field
public raw ( )

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

Adds a label to the group
public setLabel ( string $label )
$label string A label

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

Set the state of the group
public state ( string $state )
$state string A Bootstrap state class

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

Wraps content in a group
public wrap ( string $contents, string $label = null ) : string
$contents string The content
$label string The label to add
Результат string A group

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

Wrap a Field with the current group
public wrapField ( Field $field ) : string
$field Former\Traits\Field A Field instance
Результат string A group

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

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

The Container
protected Container,Illuminate\Container $app
Результат Illuminate\Container\Container

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

An array of elements to append the field
protected array $append
Результат array

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

The group's element
protected string $element
Результат string

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

The group help
protected array $help
Результат array

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

The group label
protected Element,HtmlObject $label
Результат HtmlObject\Element

$openGroup публичное статическое свойство

The custom group that is open
public static Former\Form\Group $openGroup
Результат Former\Form\Group

$opened публичное статическое свойство

Whether a custom group is opened or not
public static bool $opened
Результат boolean

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

An array of elements to preprend the field
protected array $prepend
Результат array

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

Whether the field should be displayed raw or not
protected bool $raw
Результат boolean

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

The current state of the group
protected string $state
Результат string

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

The field validations to be checked for errors
protected array $validations
Результат array