PHP 클래스 Carbon_Fields\Field\Group_Field

파일 보기 프로젝트 열기: htmlburger/carbon-fields 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$fields array Group fields.
$group_id string Unique group identificator. Generated randomly.
$label string Group label, used during rendering.
$label_template string Group label underscore template.
$name string Sanitized group name.
$registered_field_names array List of registered unique field names

공개 메소드들

메소드 설명
__construct ( string $name, string $label, array $fields ) Create a group field with the specified name and label.
add_fields ( array $fields ) Add a group of fields.
get_field_names ( ) : array Return the names of all fields.
get_fields ( ) : array Fields attribute getter.
get_group_id ( ) : string Group ID attribute getter.
get_label ( ) : string Label attribute getter.
get_label_template ( ) : string Set the Underscore label template.
get_name ( ) : string Return the group name.
set_datastore ( Carbon_Fields\Datastore\Datastore_Interface $store ) Assign a DataStore instance for all group fields.
set_label ( string $label ) Set the group label.
set_label_template ( string $template ) Set the Underscore label template.
set_name ( string $name ) Set the group name.
set_prefix ( string $prefix ) Set a prefix for all group fields.
template_label ( ) Print the label Underscore template.
to_json ( boolean $load ) : array Returns an array that holds the field data, suitable for JSON representation.
verify_unique_field_name ( string $name ) Perform checks whether there is a field registered with the name $name.

메소드 상세

__construct() 공개 메소드

Create a group field with the specified name and label.
public __construct ( string $name, string $label, array $fields )
$name string
$label string
$fields array

add_fields() 공개 메소드

Add a group of fields.
public add_fields ( array $fields )
$fields array

get_field_names() 공개 메소드

Return the names of all fields.
public get_field_names ( ) : array
리턴 array

get_fields() 공개 메소드

Fields attribute getter.
public get_fields ( ) : array
리턴 array

get_group_id() 공개 메소드

Group ID attribute getter.
public get_group_id ( ) : string
리턴 string

get_label() 공개 메소드

Label attribute getter.
public get_label ( ) : string
리턴 string

get_label_template() 공개 메소드

Set the Underscore label template.
public get_label_template ( ) : string
리턴 string

get_name() 공개 메소드

Return the group name.
public get_name ( ) : string
리턴 string

set_datastore() 공개 메소드

Assign a DataStore instance for all group fields.
public set_datastore ( Carbon_Fields\Datastore\Datastore_Interface $store )
$store Carbon_Fields\Datastore\Datastore_Interface

set_label() 공개 메소드

Set the group label.
public set_label ( string $label )
$label string If null, the label will be generated from the group name

set_label_template() 공개 메소드

Set the Underscore label template.
public set_label_template ( string $template )
$template string

set_name() 공개 메소드

Set the group name.
public set_name ( string $name )
$name string Group name, either sanitized or not

set_prefix() 공개 메소드

Set a prefix for all group fields.
public set_prefix ( string $prefix )
$prefix string

template_label() 공개 메소드

Print the label Underscore template.
public template_label ( )

to_json() 공개 메소드

This data will be available in the Underscore template and the Backbone Model.
public to_json ( boolean $load ) : array
$load boolean Should the value be loaded from the database or use the value from the current instance.
리턴 array

verify_unique_field_name() 공개 메소드

If not, the field name is recorded.
public verify_unique_field_name ( string $name )
$name string

프로퍼티 상세

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

Group fields.
protected array $fields
리턴 array

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

Unique group identificator. Generated randomly.
protected string $group_id
리턴 string

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

Group label, used during rendering.
protected string $label
리턴 string

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

Group label underscore template.
protected string $label_template
리턴 string

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

Sanitized group name.
protected string $name
리턴 string

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

List of registered unique field names
또한 보기: verify_unique_field_name()
protected array $registered_field_names
리턴 array