[ Index ]

PHP Cross Reference of GlotPress




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

Things: GP_Project class

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

Defines 1 class

GP_Project:: (21 methods):

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
param: int|object $thing_or_id A project or the ID.
return: GP_Project|false The project on success or false on failure.

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: 3.0.0 Added the `$project_before` parameter.
param: GP_Project $project_before Project before the update.
return: bool

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
param: array $args Arguments for a GP_Project object.
return: array Normalized arguments for a GP_Project object.

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.

since: 2.0.0
return: bool

Generated: Fri Apr 19 01:01:21 2024 Cross-referenced by PHPXref 0.7.1