PHP 트레잇 BootstrapUI\View\Helper\OptionsAwareTrait

파일 보기 프로젝트 열기: friendsofcake/bootstrap-ui 2 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$buttonClassAliases array A mapping of aliases for button styles.
$buttonClasses array A list of allowed styles for buttons.

공개 메소드들

메소드 설명
applyButtonClasses ( array $data ) : array Contains the logic for applying style classes for buttons.
checkClasses ( array | string $classes, array $options ) : boolean Checks if $classes are part of the $options['class'].
hasAnyClass ( array | string $classes, array $options ) : boolean Checks if $options['class'] contains any one of the class names.
injectClasses ( array | string $classes, array $options ) : array Injects classes into $options['class'] when they don't already exist. If a class is defined in $options['skip'] then it will not be injected. This method removes $options['skip'] before returning.
renameClasses ( array $classMap, array $options ) : array Renames any CSS classes found in the options.

보호된 메소드들

메소드 설명
_toClassArray ( mixed $mixed ) : array Normalizes class strings/arrays.

메소드 상세

_toClassArray() 보호된 메소드

Normalizes class strings/arrays.
protected _toClassArray ( mixed $mixed ) : array
$mixed mixed One or more classes.
리턴 array Classes as array.

applyButtonClasses() 공개 메소드

Contains the logic for applying style classes for buttons.
public applyButtonClasses ( array $data ) : array
$data array An array of HTML attributes and options.
리턴 array An array of HTML attributes and options.

checkClasses() 공개 메소드

Checks if $classes are part of the $options['class'].
public checkClasses ( array | string $classes, array $options ) : boolean
$classes array | string Name of class(es) to check.
$options array An array of HTML attributes and options.
리턴 boolean False if one or more class(es) do not exist.

hasAnyClass() 공개 메소드

Checks if $options['class'] contains any one of the class names.
public hasAnyClass ( array | string $classes, array $options ) : boolean
$classes array | string Name of class(es) to check.
$options array An array of HTML attributes and options.
리턴 boolean True if any one of the class names was found.

injectClasses() 공개 메소드

Injects classes into $options['class'] when they don't already exist. If a class is defined in $options['skip'] then it will not be injected. This method removes $options['skip'] before returning.
public injectClasses ( array | string $classes, array $options ) : array
$classes array | string Name of class(es) to inject.
$options array An array of HTML attributes and options.
리턴 array An array of HTML attributes and options.

renameClasses() 공개 메소드

Renames any CSS classes found in the options.
public renameClasses ( array $classMap, array $options ) : array
$classMap array Key/Value pair of class(es) to be renamed.
$options array An array of HTML attributes and options.
리턴 array An array of HTML attributes and options.

프로퍼티 상세

$buttonClassAliases 공개적으로 프로퍼티

A mapping of aliases for button styles.
public array $buttonClassAliases
리턴 array

$buttonClasses 공개적으로 프로퍼티

A list of allowed styles for buttons.
public array $buttonClasses
리턴 array