[ Index ] |
PHP Cross Reference of GlotPress |
[Source view] [Print] [Project Stats]
Things: GP_Translation class
File Size: | 824 lines (23 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
GP_Translation:: (16 methods):
create()
normalize_fields()
prepare_fields_for_save()
restrict_fields()
set_fields()
for_export()
for_translation()
set_as_current()
reject()
can_set_status()
set_status()
translations()
last_modified()
after_create()
after_save()
after_delete()
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. return: array Normalized arguments for a GP_Translation object. param: array $args Arguments for a GP_Translation object. since: 1.0.0 |
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. return: bool Whether the status can be set. param: string $desired_status The desired status. since: 2.3.0 |
set_status( $status ) X-Ref |
Changes the status of a translation if possible. return: bool Whether the setting of status was successful. param: string $status The status to be set. since: 2.3.0 |
translations() X-Ref |
No description |
last_modified( $translation_set ) X-Ref |
Retrieves the last modified date of a translation in a translation set. return: string|false The last modified date on success, false on failure. param: GP_Translation_Set $translation_set The translation set to retrieve the last modified date. since: 1.0.0 |
after_create() X-Ref |
Executes after creating a translation. return: bool since: 1.0.0 |
after_save( $translation_before ) X-Ref |
Executes after saving a translation. return: bool param: GP_Translation $translation_before Translation before the update. since: 1.0.0 since: 3.0.0 Added the `$original_before` parameter. |
after_delete() X-Ref |
Executes after deleting a translation. return: bool since: 2.0.0 |
Generated: Sun Dec 22 01:01:04 2024 | Cross-referenced by PHPXref 0.7.1 |