PHP Класс Bolt\Twig\Handler\AdminHandler

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( Silex\Application $app )
addData ( string $path, mixed $value ) Add JavaScript data to app['jsdata'].
buid ( ) : string Returns a unique ID.
hattr ( array $attributes ) : string Prepares attributes ready to attach to an html tag.
hclass ( array | string $classes, boolean $raw = false ) : string Generates pretty class attributes.
logLevel ( integer $level ) : string Convert a Monolog log level to textual equivalent.
randomQuote ( ) : string Returns a random quote. Just for fun.
stack ( array | string $types = [] ) : array Return an array with the items on the stack.
testStackable ( Bolt\Filesystem\Handler\FileInterface | string $filename ) : boolean Return whether or not a file is stackable.
trans ( array $args, integer $numArgs ) : string Translate using our __().
ymllink ( string $str, boolean $safe ) : string Create a link to edit a .yml file, if a filename is detected in the string. Mostly for use in Flashbag messages, to allow easy editing.

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

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

public __construct ( Silex\Application $app )
$app Silex\Application

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

Add JavaScript data to app['jsdata'].
public addData ( string $path, mixed $value )
$path string
$value mixed

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

Returns a unique ID.
public buid ( ) : string
Результат string UID

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

- Handles boolean attributes. - Omits empty attributes if not forced by appending '!' to the name. - JSON encodes array values - Prettied output of class attribute and array data is handled.
public hattr ( array $attributes ) : string
$attributes array
Результат string Attributes

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

Generates pretty class attributes.
public hclass ( array | string $classes, boolean $raw = false ) : string
$classes array | string
$raw boolean
Результат string Class attribute

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

Convert a Monolog log level to textual equivalent.
public logLevel ( integer $level ) : string
$level integer
Результат string

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

Returns a random quote. Just for fun.
public randomQuote ( ) : string
Результат string

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

Return an array with the items on the stack.
public stack ( array | string $types = [] ) : array
$types array | string
Результат array An array of items

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

Return whether or not a file is stackable.
public testStackable ( Bolt\Filesystem\Handler\FileInterface | string $filename ) : boolean
$filename Bolt\Filesystem\Handler\FileInterface | string
Результат boolean

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

Translate using our __().
public trans ( array $args, integer $numArgs ) : string
$args array
$numArgs integer
Результат string Translated content