[ Index ]

PHP Cross Reference of GlotPress




/gp-includes/things/ -> translation.php (summary)

Things: GP_Translation class

File Size: 824 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

GP_Translation:: (16 methods):

Class: GP_Translation  - X-Ref

Core class used to implement the translations.

create( $args )   X-Ref
Number of supported translations per original.

normalize_fields( $args )   X-Ref
Normalizes an array with key-value pairs representing
a GP_Translation object.

param: array $args Arguments for a GP_Translation object.
since: 1.0.0
return: array Normalized arguments for a GP_Translation object.

prepare_fields_for_save( $args )   X-Ref
No description

restrict_fields( $rules )   X-Ref
Sets restriction rules for fields.

param: GP_Validation_Rules $rules The validation rules instance.
since: 1.0.0

set_fields( $fields )   X-Ref
Sets fields of the current GP_Thing object.

param: array $fields Fields for a GP_Thing object.

for_export( $project, $translation_set, $filters = null )   X-Ref
No description

for_translation( $project, $translation_set, $page, $filters = array()   X-Ref
No description

set_as_current()   X-Ref
No description

reject()   X-Ref
No description

can_set_status( $desired_status )   X-Ref
Decides whether the status of a translation can be changed to a desired status.

param: string $desired_status The desired status.
since: 2.3.0
return: bool Whether the status can be set.

set_status( $status )   X-Ref
Changes the status of a translation if possible.

param: string $status The status to be set.
since: 2.3.0
return: bool Whether the setting of status was successful.

translations()   X-Ref
No description

last_modified( $translation_set )   X-Ref
Retrieves the last modified date of a translation in a translation set.

param: GP_Translation_Set $translation_set The translation set to retrieve the last modified date.
since: 1.0.0
return: string|false The last modified date on success, false on failure.

after_create()   X-Ref
Executes after creating a translation.

since: 1.0.0
return: bool

after_save( $translation_before )   X-Ref
Executes after saving a translation.

param: GP_Translation $translation_before Translation before the update.
since: 1.0.0
since: 3.0.0 Added the `$original_before` parameter.
return: bool

after_delete()   X-Ref
Executes after deleting a translation.

since: 2.0.0
return: bool

Generated: Wed Apr 17 01:01:13 2024 Cross-referenced by PHPXref 0.7.1