PHP 클래스 Papi_Property_Repeater, papi

상속: extends Papi_Property
파일 보기 프로젝트 열기: wp-papi/papi 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$convert_type string The convert type.
$default_value array The default value.

보호된 프로퍼티들

프로퍼티 타입 설명
$counter integer Repeater counter number.
$exclude_properties array Exclude properties that is not allowed in a repeater.

공개 메소드들

메소드 설명
delete_value ( string $slug, integer $post_id, string $type ) : boolean Delete value from the database.
format_value ( mixed $values, string $repeater_slug, integer $post_id ) : array Format the value of the property before it's returned to WordPress admin or the site.
get_default_settings ( ) : array Get default settings.
get_import_settings ( ) : array Get import settings.
html ( ) Render property html.
import_value ( mixed $value, string $slug, integer $post_id ) : array Import value to the property.
load_value ( integer $value, string $repeater_slug, integer $post_id ) : array Change value after it's loaded from the database and populate every property in the repeater with the right property type.
render_ajax_request ( ) Render AJAX request.
render_repeater_rows_template ( ) Render repeater row template.
update_value ( mixed $values, string $repeater_slug, integer $post_id ) : array Update value before it's saved to the database.

보호된 메소드들

메소드 설명
get_child_slug ( string $repeater_slug, string $child_slug ) : string Get child slug from the repeater slug.
get_results ( integer $value, string $repeater_slug, integer $post_id ) : array Get results from the database.
get_row_results ( array $dbresults ) : array Get row results.
get_settings_properties ( ) : array Get settings properties.
layout ( string $layout ) : boolean Check if the given layout is the layouted used.
load_child_properties ( array $results, Papi_Core_Property $property = null ) : array Load child properties.
prepare_properties ( array $items ) : array Prepare properties, get properties options object, check which properties that are allowed to use.
prepare_property_for_json ( Papi_Property $property ) : boolean | object Prepare property for JSON.
remove_repeater_rows ( integer $post_id, string $repeater_slug ) Remove all repeater rows from the database.
render_json_template ( string $slug ) Render property JSON template.
render_properties ( array $row, array | boolean $value ) Render properties.
render_repeater ( stdClass $options ) Render repeater html.
render_repeater_head ( ) Render repeater head.
render_repeater_rows ( ) Render repeater rows.
setup_actions ( ) Setup actions.

메소드 상세

delete_value() 공개 메소드

Delete value from the database.
public delete_value ( string $slug, integer $post_id, string $type ) : boolean
$slug string
$post_id integer
$type string
리턴 boolean

format_value() 공개 메소드

Format the value of the property before it's returned to WordPress admin or the site.
public format_value ( mixed $values, string $repeater_slug, integer $post_id ) : array
$values mixed
$repeater_slug string
$post_id integer
리턴 array

get_child_slug() 보호된 메소드

Get child slug from the repeater slug.
protected get_child_slug ( string $repeater_slug, string $child_slug ) : string
$repeater_slug string
$child_slug string
리턴 string

get_default_settings() 공개 메소드

Get default settings.
public get_default_settings ( ) : array
리턴 array

get_import_settings() 공개 메소드

Get import settings.
public get_import_settings ( ) : array
리턴 array

get_results() 보호된 메소드

Get results from the database.
protected get_results ( integer $value, string $repeater_slug, integer $post_id ) : array
$value integer
$repeater_slug string
$post_id integer
리턴 array

get_row_results() 보호된 메소드

Get row results.
protected get_row_results ( array $dbresults ) : array
$dbresults array
리턴 array

get_settings_properties() 보호된 메소드

Get settings properties.
protected get_settings_properties ( ) : array
리턴 array

html() 공개 메소드

Render property html.
public html ( )

import_value() 공개 메소드

Import value to the property.
public import_value ( mixed $value, string $slug, integer $post_id ) : array
$value mixed
$slug string
$post_id integer
리턴 array

layout() 보호된 메소드

Check if the given layout is the layouted used.
protected layout ( string $layout ) : boolean
$layout string
리턴 boolean

load_child_properties() 보호된 메소드

Load child properties.
protected load_child_properties ( array $results, Papi_Core_Property $property = null ) : array
$results array
$property Papi_Core_Property
리턴 array

load_value() 공개 메소드

Change value after it's loaded from the database and populate every property in the repeater with the right property type.
public load_value ( integer $value, string $repeater_slug, integer $post_id ) : array
$value integer
$repeater_slug string
$post_id integer
리턴 array

prepare_properties() 보호된 메소드

Prepare properties, get properties options object, check which properties that are allowed to use.
protected prepare_properties ( array $items ) : array
$items array
리턴 array

prepare_property_for_json() 보호된 메소드

Prepare property for JSON.
protected prepare_property_for_json ( Papi_Property $property ) : boolean | object
$property Papi_Property
리턴 boolean | object

remove_repeater_rows() 보호된 메소드

Remove all repeater rows from the database.
protected remove_repeater_rows ( integer $post_id, string $repeater_slug )
$post_id integer
$repeater_slug string

render_ajax_request() 공개 메소드

Render AJAX request.
public render_ajax_request ( )

render_json_template() 보호된 메소드

Render property JSON template.
protected render_json_template ( string $slug )
$slug string

render_properties() 보호된 메소드

Render properties.
protected render_properties ( array $row, array | boolean $value )
$row array
$value array | boolean

render_repeater() 보호된 메소드

Render repeater html.
protected render_repeater ( stdClass $options )
$options stdClass

render_repeater_head() 보호된 메소드

Render repeater head.
protected render_repeater_head ( )

render_repeater_rows() 보호된 메소드

Render repeater rows.
protected render_repeater_rows ( )

render_repeater_rows_template() 공개 메소드

Render repeater row template.

setup_actions() 보호된 메소드

Setup actions.
protected setup_actions ( )

update_value() 공개 메소드

Update value before it's saved to the database.
public update_value ( mixed $values, string $repeater_slug, integer $post_id ) : array
$values mixed
$repeater_slug string
$post_id integer
리턴 array

프로퍼티 상세

$convert_type 공개적으로 프로퍼티

The convert type.
public string $convert_type
리턴 string

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

Repeater counter number.
protected int $counter
리턴 integer

$default_value 공개적으로 프로퍼티

The default value.
public array $default_value
리턴 array

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

Exclude properties that is not allowed in a repeater.
protected array $exclude_properties
리턴 array