[ Index ] |
PHP Cross Reference of GlotPress |
[Source view] [Print] [Project Stats]
Things: GP_Project class
File Size: | 460 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
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. param: GP_Validation_Rules $rules The validation rules instance. since: 1.0.0 |
by_path( $path ) X-Ref |
No description |
get( $thing_or_id ) X-Ref |
Fetches the project by ID or object. return: GP_Project|false The project on success or false on failure. param: int|object $thing_or_id A project or the ID. since: 2.3.0 |
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. return: bool since: 1.0.0 |
after_save( $project_before ) X-Ref |
Executes after saving a project. return: bool param: GP_Project $project_before Project before the update. since: 1.0.0 since: 3.0.0 Added the `$project_before` parameter. |
after_delete() X-Ref |
Executes after deleting a project. return: bool since: 2.0.0 |
normalize_fields( $args ) X-Ref |
Normalizes an array with key-value pairs representing a GP_Project object. return: array Normalized arguments for a GP_Project object. param: array $args Arguments for a GP_Project object. since: 1.0.0 |
update_path() X-Ref |
Updates this project's and its children's paths, according to its current slug. |
regenerate_paths( $parent_project_id = null ) X-Ref |
Regenerate 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. return: bool since: 2.0.0 |
Generated: Sun Dec 22 01:01:04 2024 | Cross-referenced by PHPXref 0.7.1 |