PHP Класс Collective\Html\HtmlBuilder

Наследование: use trait Illuminate\Support\Traits\Macroable, use trait Collective\Html\Componentable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$url Illuminate\Contracts\Routing\UrlGenerator The URL generator instance.
$view Illuminate\Contracts\View\Factory The View Factory instance.

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

Метод Описание
__call ( string $method, array $parameters ) : Illuminate\Contracts\View\View | mixed Dynamically handle calls to the class.
__construct ( Illuminate\Contracts\Routing\UrlGenerator $url = null, Illuminate\Contracts\View\Factory $view ) Create a new HTML builder instance.
attributes ( array $attributes ) : string Build an HTML attribute string from an array.
componentCall ( )
decode ( string $value ) : string Convert entities to HTML characters.
dl ( array $list, array $attributes = [] ) : Illuminate\Support\HtmlString Generate a description list of items.
email ( string $email ) : string Obfuscate an e-mail address to prevent spam-bots from sniffing it.
entities ( string $value ) : string Convert an HTML string to entities.
favicon ( string $url, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString Generate a link to a Favicon file.
image ( string $url, string $alt = null, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString Generate an HTML image element.
link ( string $url, string $title = null, array $attributes = [], boolean $secure = null, boolean $escape = true ) : Illuminate\Support\HtmlString Generate a HTML link.
linkAction ( string $action, string $title = null, array $parameters = [], array $attributes = [] ) : Illuminate\Support\HtmlString Generate a HTML link to a controller action.
linkAsset ( string $url, string $title = null, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString Generate a HTML link to an asset.
linkRoute ( string $name, string $title = null, array $parameters = [], array $attributes = [] ) : Illuminate\Support\HtmlString Generate a HTML link to a named route.
linkSecureAsset ( string $url, string $title = null, array $attributes = [] ) : Illuminate\Support\HtmlString Generate a HTTPS HTML link to an asset.
macroCall ( )
mailto ( string $email, string $title = null, array $attributes = [], boolean $escape = true ) : Illuminate\Support\HtmlString Generate a HTML link to an email address.
meta ( string $name, string $content, array $attributes = [] ) : Illuminate\Support\HtmlString Generate a meta tag.
nbsp ( integer $num = 1 ) : string Generates non-breaking space entities based on number supplied.
obfuscate ( string $value ) : string Obfuscate a string to prevent spam-bots from sniffing it.
ol ( array $list, array $attributes = [] ) : Illuminate\Support\HtmlString | string Generate an ordered list of items.
script ( string $url, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString Generate a link to a JavaScript file.
secureLink ( string $url, string $title = null, array $attributes = [] ) : Illuminate\Support\HtmlString Generate a HTTPS HTML link.
style ( string $url, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString Generate a link to a CSS file.
tag ( string $tag, mixed $content, array $attributes = [] ) : Illuminate\Support\HtmlString Generate an html tag.
ul ( array $list, array $attributes = [] ) : Illuminate\Support\HtmlString | string Generate an un-ordered list of items.

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

Метод Описание
attributeElement ( string $key, string $value ) : string Build a single attribute element.
listing ( string $type, array $list, array $attributes = [] ) : Illuminate\Support\HtmlString | string Create a listing HTML element.
listingElement ( mixed $key, string $type, mixed $value ) : string Create the HTML for a listing element.
nestedListing ( mixed $key, string $type, mixed $value ) : string Create the HTML for a nested listing attribute.
toHtmlString ( $html ) : Illuminate\Support\HtmlString Transform the string to an Html serializable object

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

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

Dynamically handle calls to the class.
public __call ( string $method, array $parameters ) : Illuminate\Contracts\View\View | mixed
$method string
$parameters array
Результат Illuminate\Contracts\View\View | mixed

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

Create a new HTML builder instance.
public __construct ( Illuminate\Contracts\Routing\UrlGenerator $url = null, Illuminate\Contracts\View\Factory $view )
$url Illuminate\Contracts\Routing\UrlGenerator
$view Illuminate\Contracts\View\Factory

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

Build a single attribute element.
protected attributeElement ( string $key, string $value ) : string
$key string
$value string
Результат string

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

Build an HTML attribute string from an array.
public attributes ( array $attributes ) : string
$attributes array
Результат string

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

public componentCall ( )

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

Convert entities to HTML characters.
public decode ( string $value ) : string
$value string
Результат string

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

Generate a description list of items.
public dl ( array $list, array $attributes = [] ) : Illuminate\Support\HtmlString
$list array
$attributes array
Результат Illuminate\Support\HtmlString

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

Obfuscate an e-mail address to prevent spam-bots from sniffing it.
public email ( string $email ) : string
$email string
Результат string

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

Convert an HTML string to entities.
public entities ( string $value ) : string
$value string
Результат string

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

Generate a link to a Favicon file.
public favicon ( string $url, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString
$url string
$attributes array
$secure boolean
Результат Illuminate\Support\HtmlString

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

Generate an HTML image element.
public image ( string $url, string $alt = null, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString
$url string
$alt string
$attributes array
$secure boolean
Результат Illuminate\Support\HtmlString

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

Generate a HTML link to a controller action.
public linkAction ( string $action, string $title = null, array $parameters = [], array $attributes = [] ) : Illuminate\Support\HtmlString
$action string
$title string
$parameters array
$attributes array
Результат Illuminate\Support\HtmlString

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

Generate a HTML link to an asset.
public linkAsset ( string $url, string $title = null, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString
$url string
$title string
$attributes array
$secure boolean
Результат Illuminate\Support\HtmlString

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

Generate a HTML link to a named route.
public linkRoute ( string $name, string $title = null, array $parameters = [], array $attributes = [] ) : Illuminate\Support\HtmlString
$name string
$title string
$parameters array
$attributes array
Результат Illuminate\Support\HtmlString

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

Generate a HTTPS HTML link to an asset.
public linkSecureAsset ( string $url, string $title = null, array $attributes = [] ) : Illuminate\Support\HtmlString
$url string
$title string
$attributes array
Результат Illuminate\Support\HtmlString

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

Create a listing HTML element.
protected listing ( string $type, array $list, array $attributes = [] ) : Illuminate\Support\HtmlString | string
$type string
$list array
$attributes array
Результат Illuminate\Support\HtmlString | string

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

Create the HTML for a listing element.
protected listingElement ( mixed $key, string $type, mixed $value ) : string
$key mixed
$type string
$value mixed
Результат string

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

public macroCall ( )

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

Generate a HTML link to an email address.
public mailto ( string $email, string $title = null, array $attributes = [], boolean $escape = true ) : Illuminate\Support\HtmlString
$email string
$title string
$attributes array
$escape boolean
Результат Illuminate\Support\HtmlString

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

Generate a meta tag.
public meta ( string $name, string $content, array $attributes = [] ) : Illuminate\Support\HtmlString
$name string
$content string
$attributes array
Результат Illuminate\Support\HtmlString

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

Generates non-breaking space entities based on number supplied.
public nbsp ( integer $num = 1 ) : string
$num integer
Результат string

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

Create the HTML for a nested listing attribute.
protected nestedListing ( mixed $key, string $type, mixed $value ) : string
$key mixed
$type string
$value mixed
Результат string

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

Obfuscate a string to prevent spam-bots from sniffing it.
public obfuscate ( string $value ) : string
$value string
Результат string

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

Generate an ordered list of items.
public ol ( array $list, array $attributes = [] ) : Illuminate\Support\HtmlString | string
$list array
$attributes array
Результат Illuminate\Support\HtmlString | string

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

Generate a link to a JavaScript file.
public script ( string $url, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString
$url string
$attributes array
$secure boolean
Результат Illuminate\Support\HtmlString

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

Generate a link to a CSS file.
public style ( string $url, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString
$url string
$attributes array
$secure boolean
Результат Illuminate\Support\HtmlString

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

Generate an html tag.
public tag ( string $tag, mixed $content, array $attributes = [] ) : Illuminate\Support\HtmlString
$tag string
$content mixed
$attributes array
Результат Illuminate\Support\HtmlString

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

Transform the string to an Html serializable object
protected toHtmlString ( $html ) : Illuminate\Support\HtmlString
$html
Результат Illuminate\Support\HtmlString

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

Generate an un-ordered list of items.
public ul ( array $list, array $attributes = [] ) : Illuminate\Support\HtmlString | string
$list array
$attributes array
Результат Illuminate\Support\HtmlString | string

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

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

The URL generator instance.
protected UrlGenerator,Illuminate\Contracts\Routing $url
Результат Illuminate\Contracts\Routing\UrlGenerator

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

The View Factory instance.
protected Factory,Illuminate\Contracts\View $view
Результат Illuminate\Contracts\View\Factory