ACF_Repeater_Table::__construct()publicACF 1.0

Constructs the ACF_Repeater_Table class.

Метод класса: ACF_Repeater_Table{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ACF_Repeater_Table = new ACF_Repeater_Table();
$ACF_Repeater_Table->__construct( $field );
$field(массив) (обязательный)
The main field array for the repeater being rendered.

Код ACF_Repeater_Table::__construct() ACF 6.0.4

public function __construct( $field ) {
	$this->field      = $field;
	$this->sub_fields = $field['sub_fields'];

	// Default to non-paginated repeaters.
	if ( empty( $this->field['pagination'] ) ) {
		$this->field['pagination'] = false;
	}

	// We don't yet support pagination inside other repeaters or flexible content fields.
	if ( ! empty( $this->field['parent_repeater'] ) || ! empty( $this->field['parent_layout'] ) ) {
		$this->field['pagination'] = false;
	}

	// We don't yet support pagination in frontend forms or inside blocks.
	if ( ! is_admin() || acf_get_data( 'acf_inside_rest_call' ) || doing_action( 'wp_ajax_acf/ajax/fetch-block' ) ) {
		$this->field['pagination'] = false;
	}

	$this->setup();
}