PHP 클래스 GP_Translation, GlotPress-WP

상속: extends GP_Thing
파일 보기 프로젝트 열기: GlotPress/GlotPress-WP 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$date_added string Date when the translation was added.
$date_modified string Date when the translation was modified.
$field_names array List of field names for a translation.
$found_rows integer Number of found results.
$id integer ID of the translation.
$int_fields array List of field names which have an integer value.
$non_updatable_attributes array List of field names which cannot be updated.
$number_of_plural_translations integer Number of supported translations per original.
$original_id integer ID of the original.
$per_page integer Number of translations per page.
$status string Status of the translation.
$statuses array List of valid statuses.
$table_basename string Name of the database table.
$translation_0 string Translation for a singular form.
$translation_1 string Translation for a plural form.
$translation_2 string Translation for a second plural form.
$translation_3 string Translation for a third plural form.
$translation_4 string Translation for a fourth plural form.
$translation_5 string Translation for a fifth plural form.
$translation_set_id integer ID of the translation set.
$user_id integer ID of a user who submitted the translation.
$user_id_last_modified integer ID of a user (validator) who last changed the status of the translation.
$warnings array List of warnings when translation isn't correct.

공개 메소드들

메소드 설명
after_create ( ) : boolean Executes after creating a translation.
after_delete ( ) : boolean Executes after deleting a translation.
after_save ( ) : boolean Executes after saving a translation.
create ( $args )
fix_translation ( $translation )
for_export ( $project, $translation_set, $filters = null )
for_translation ( $project, $translation_set, $page, $filters = [], $sort = [] )
last_modified ( $translation_set )
normalize_fields ( array $args ) : array Normalizes an array with key-value pairs representing a GP_Translation object.
prepare_fields_for_save ( $args )
reject ( )
restrict_fields ( GP_Validation_Rules $rules ) Sets restriction rules for fields.
set_as_current ( )
set_fields ( $db_object )
set_status ( $status )
translations ( )

메소드 상세

after_create() 공개 메소드

Executes after creating a translation.
부터: 1.0.0
public after_create ( ) : boolean
리턴 boolean

after_delete() 공개 메소드

Executes after deleting a translation.
부터: 2.0.0
public after_delete ( ) : boolean
리턴 boolean

after_save() 공개 메소드

Executes after saving a translation.
부터: 1.0.0
public after_save ( ) : boolean
리턴 boolean

create() 공개 메소드

public create ( $args )

fix_translation() 공개 메소드

public fix_translation ( $translation )

for_export() 공개 메소드

public for_export ( $project, $translation_set, $filters = null )

for_translation() 공개 메소드

public for_translation ( $project, $translation_set, $page, $filters = [], $sort = [] )

last_modified() 공개 메소드

public last_modified ( $translation_set )

normalize_fields() 공개 메소드

Normalizes an array with key-value pairs representing a GP_Translation object.
부터: 1.0.0
public normalize_fields ( array $args ) : array
$args array Arguments for a GP_Translation object.
리턴 array Normalized arguments for a GP_Translation object.

prepare_fields_for_save() 공개 메소드

public prepare_fields_for_save ( $args )

reject() 공개 메소드

public reject ( )

restrict_fields() 공개 메소드

Sets restriction rules for fields.
부터: 1.0.0
public restrict_fields ( GP_Validation_Rules $rules )
$rules GP_Validation_Rules The validation rules instance.

set_as_current() 공개 메소드

public set_as_current ( )

set_fields() 공개 메소드

public set_fields ( $db_object )

set_status() 공개 메소드

public set_status ( $status )

translations() 공개 메소드

public translations ( )

프로퍼티 상세

$date_added 공개적으로 프로퍼티

Date when the translation was added.
public string $date_added
리턴 string

$date_modified 공개적으로 프로퍼티

Date when the translation was modified.
public string $date_modified
리턴 string

$field_names 공개적으로 프로퍼티

List of field names for a translation.
public array $field_names
리턴 array

$found_rows 공개적으로 프로퍼티

Number of found results.
public int $found_rows
리턴 integer

$id 공개적으로 프로퍼티

ID of the translation.
public int $id
리턴 integer

$int_fields 공개적으로 프로퍼티

List of field names which have an integer value.
public array $int_fields
리턴 array

$non_updatable_attributes 공개적으로 프로퍼티

List of field names which cannot be updated.
public array $non_updatable_attributes
리턴 array

$number_of_plural_translations 공개적으로 정적으로 프로퍼티

Number of supported translations per original.
public static int $number_of_plural_translations
리턴 integer

$original_id 공개적으로 프로퍼티

ID of the original.
public int $original_id
리턴 integer

$per_page 공개적으로 프로퍼티

Number of translations per page.
public int $per_page
리턴 integer

$status 공개적으로 프로퍼티

Status of the translation.
public string $status
리턴 string

$statuses 공개적으로 정적으로 프로퍼티

List of valid statuses.
public static array $statuses
리턴 array

$table_basename 공개적으로 프로퍼티

Name of the database table.
public string $table_basename
리턴 string

$translation_0 공개적으로 프로퍼티

Translation for a singular form.
public string $translation_0
리턴 string

$translation_1 공개적으로 프로퍼티

Translation for a plural form.
public string $translation_1
리턴 string

$translation_2 공개적으로 프로퍼티

Translation for a second plural form.
public string $translation_2
리턴 string

$translation_3 공개적으로 프로퍼티

Translation for a third plural form.
public string $translation_3
리턴 string

$translation_4 공개적으로 프로퍼티

Translation for a fourth plural form.
public string $translation_4
리턴 string

$translation_5 공개적으로 프로퍼티

Translation for a fifth plural form.
public string $translation_5
리턴 string

$translation_set_id 공개적으로 프로퍼티

ID of the translation set.
public int $translation_set_id
리턴 integer

$user_id 공개적으로 프로퍼티

ID of a user who submitted the translation.
public int $user_id
리턴 integer

$user_id_last_modified 공개적으로 프로퍼티

ID of a user (validator) who last changed the status of the translation.
부터: 2.1.0
public int $user_id_last_modified
리턴 integer

$warnings 공개적으로 프로퍼티

List of warnings when translation isn't correct.
public array $warnings
리턴 array