[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

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

Things: GP_Translation class

File Size: 877 lines (26 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.

since: 1.0.0
return: array Normalized arguments for a GP_Translation object.
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.

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

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

since: 2.3.0
return: bool Whether the setting of status was successful.
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.

since: 1.0.0
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.

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.

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

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

since: 2.0.0
return: bool



Generated: Sat Jul 4 01:01:51 2020 Cross-referenced by PHPXref 0.7.1