PHP 클래스 Bolt\Twig\Handler\AdminHandler

파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

공개 메소드들

메소드 설명
__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