[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/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):
  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.
since: 1.0.0
param: array $args 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.

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

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.
since: 2.3.0
param: string $desired_status The desired status.

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

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

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.
since: 1.0.0
param: GP_Translation_Set $translation_set The translation set to retrieve the last modified date.

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
since: 1.0.0
since: 3.0.0 Added the `$original_before` parameter.
param: GP_Translation $translation_before Translation before the update.

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

return: bool
since: 2.0.0



Generated: Sat Dec 14 01:01:05 2024 Cross-referenced by PHPXref 0.7.1