[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

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

Things: GP_Project class

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

Defines 1 class

GP_Project:: (21 methods):
  restrict_fields()
  by_path()
  get()
  sub_projects()
  top_level()
  after_create()
  after_save()
  after_delete()
  normalize_fields()
  update_path()
  regenerate_paths()
  source_url()
  source_url_template()
  path_to_root()
  set_difference_from()
  _compare_set_item()
  copy_sets_and_translations_from()
  copy_originals_from()
  inclusive_sub_projects()
  duplicate_project_contents_from()
  delete()


Class: GP_Project  - X-Ref

Core class used to implement the projects.

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

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

by_path( $path )   X-Ref
No description

get( $thing_or_id )   X-Ref
Fetches the project by id or object.

since: 2.3.0
return: GP_Project The project
param: int|object $thing_or_id A project or the id.

sub_projects()   X-Ref
Retrieves the sub projects

return: array Array of GP_Project

top_level()   X-Ref
No description

after_create()   X-Ref
Executes after creating a project.

since: 1.0.0
return: bool

after_save( $project_before )   X-Ref
Executes after saving a project.

since: 1.0.0
since: 2.4.0 Added the `$project_before` parameter.
return: bool
param: GP_Project $project_before Project before the update.

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

since: 2.0.0
return: bool

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

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

update_path()   X-Ref
Updates this project's and its chidlren's paths, according to its current slug.


regenerate_paths( $parent_project_id = null )   X-Ref
Regenrate the paths of all projects from its parents slugs


source_url( $file, $line )   X-Ref
No description

source_url_template()   X-Ref
No description

path_to_root()   X-Ref
Gives an array of project objects starting from the current project
then its parent, its parent and up to the root

return: array

set_difference_from( $other_project )   X-Ref
No description

_compare_set_item( $set, $this_set )   X-Ref
No description

copy_sets_and_translations_from( $source_project_id )   X-Ref
No description

copy_originals_from( $source_project_id )   X-Ref
No description

inclusive_sub_projects()   X-Ref
Gives an array of project objects starting from the current project children
then its grand children etc

return: array

duplicate_project_contents_from( $source_project )   X-Ref
No description

delete()   X-Ref
Deletes a project and all of sub projects, translations, translation sets, originals and glossaries.

since: 2.0.0
return: bool



Generated: Mon Nov 18 01:01:56 2019 Cross-referenced by PHPXref 0.7.1