PHP 클래스 Carbon_Fields\Field\Predefined_Options_Field

Mainly used to reduce the bloat on the base Field class.
상속: extends Field
파일 보기 프로젝트 열기: htmlburger/carbon-fields

보호된 프로퍼티들

프로퍼티 타입 설명
$options array | callable Stores the field options (if any)

공개 메소드들

메소드 설명
add_options ( array | callable $options ) Add new options to this field.
get_options ( ) : array | callable Retrieve the current options.
parse_options ( array | callable $options ) : array Changes the options array structure. This is needed to keep the array items order when it is JSON encoded.
set_options ( array | callable $options ) Set the options of this field.

보호된 메소드들

메소드 설명
load_options ( ) Check if there are callbacks and populate the options

메소드 상세

add_options() 공개 메소드

Accepts an array of data.
public add_options ( array | callable $options )
$options array | callable

get_options() 공개 메소드

Retrieve the current options.
public get_options ( ) : array | callable
리턴 array | callable $options

load_options() 보호된 메소드

Check if there are callbacks and populate the options
protected load_options ( )

parse_options() 공개 메소드

Will also work with a callable that returns an array.
public parse_options ( array | callable $options ) : array
$options array | callable
리턴 array

set_options() 공개 메소드

Accepts either array of data or a callback that returns the data.
public set_options ( array | callable $options )
$options array | callable

프로퍼티 상세

$options 보호되어 있는 프로퍼티

Stores the field options (if any)
protected array|callable $options
리턴 array | callable