[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

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

Things: GP_Original class

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

Defines 1 class

GP_Original:: (15 methods):
  restrict_fields()
  normalize_fields()
  by_project_id()
  count_by_project_id()
  by_project_id_and_entry()
  import_for_project()
  set_translations_for_original_to_fuzzy()
  is_different_from()
  priority_by_name()
  closest_original()
  get_matching_originals_in_other_projects()
  delete()
  after_create()
  after_save()
  after_delete()


Class: GP_Original  - X-Ref

Core class used to implement the originals.

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

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

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

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

by_project_id( $project_id )   X-Ref
No description

count_by_project_id( $project_id, $type = 'total' )   X-Ref
Retrieves the number of originals for a project.

param: int    $project_id The ID of a project.
param: string $type       The return type. 'total' for public and hidden counts, 'hidden'
since: 1.0.0
since: 2.1.0 Added the `$type` parameter.
return: object|int Object when `$type` is 'all', non-negative integer in all other cases.

by_project_id_and_entry( $project_id, $entry, $status = null )   X-Ref
No description

import_for_project( $project, $translations )   X-Ref
No description

set_translations_for_original_to_fuzzy( $original_id )   X-Ref
No description

is_different_from( $data, $original = null )   X-Ref
No description

priority_by_name( $name )   X-Ref
No description

closest_original( $input, $other_strings )   X-Ref
No description

get_matching_originals_in_other_projects()   X-Ref
No description

delete()   X-Ref
Deletes an original and all of its translations.

since: 3.0.0
return: bool

after_create()   X-Ref
Executes after creating an original.

since: 1.0.0
return: bool

after_save( $original_before )   X-Ref
Executes after saving an original.

param: GP_Original $original_before Original before the update.
since: 2.0.0
since: 3.0.0 Added the `$original_before` parameter.
return: bool

after_delete()   X-Ref
Executes after deleting an original.

since: 2.0.0
return: bool



Generated: Thu Dec 26 01:01:15 2024 Cross-referenced by PHPXref 0.7.1