Property | Type | Description | |
---|---|---|---|
$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. |
Method | Description | |
---|---|---|
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 ( ) |
public after_create ( ) : boolean | ||
return | boolean |
public after_delete ( ) : boolean | ||
return | boolean |
public after_save ( ) : boolean | ||
return | boolean |
public for_translation ( $project, $translation_set, $page, $filters = [], $sort = [] ) |
public normalize_fields ( array $args ) : array | ||
$args | array | Arguments for a GP_Translation object. |
return | array | Normalized arguments for a GP_Translation object. |
public restrict_fields ( GP_Validation_Rules $rules ) | ||
$rules | GP_Validation_Rules | The validation rules instance. |
public string $date_added | ||
return | string |
public string $date_modified | ||
return | string |
public array $field_names | ||
return | array |
public array $int_fields | ||
return | array |
public array $non_updatable_attributes | ||
return | array |
public static int $number_of_plural_translations | ||
return | integer |
public static array $statuses | ||
return | array |
public string $table_basename | ||
return | string |
public string $translation_0 | ||
return | string |
public string $translation_1 | ||
return | string |
public string $translation_2 | ||
return | string |
public string $translation_3 | ||
return | string |
public string $translation_4 | ||
return | string |
public string $translation_5 | ||
return | string |
public int $translation_set_id | ||
return | integer |
public int $user_id | ||
return | integer |
public int $user_id_last_modified | ||
return | integer |
public array $warnings | ||
return | array |