[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

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

Things: GP_Translation class

File Size: 823 lines (25 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.

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( $db_object )   X-Ref
No description

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
No description

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: 2.4.0 Added the `$original_before` parameter.
return: bool

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

since: 2.0.0
return: bool



Generated: Tue Aug 20 01:01:57 2019 Cross-referenced by PHPXref 0.7.1