Class GP_Project

Description

Located in /gp-includes/things/project.php (line 2)

GP_Thing
   |
   --GP_Project
Variable Summary
Method Summary
void after_create ()
void after_save ()
void by_path ( $path)
void normalize_fields ( $args)
array path_to_root ()
void regenerate_paths ([ $parent_project_id = null])
void restrict_fields ( $project)
void set_difference_from ( $other_project)
void source_url ( $file,  $line)
void sub_projects ()
void top_level ()
void update_path ()
Variables
mixed $field_names = array( 'id', 'name', 'slug', 'path', 'description', 'parent_project_id', 'source_url_template', 'active' ) (line 5)

Redefinition of:
GP_Thing::$field_names
mixed $non_updatable_attributes = array( 'id' ) (line 6)
mixed $table_basename = 'projects' (line 4)

Inherited Variables

Inherited from GP_Thing

GP_Thing::$errors
GP_Thing::$map_results
GP_Thing::$non_db_field_names
GP_Thing::$per_page
GP_Thing::$static
GP_Thing::$static_by_class
GP_Thing::$table
GP_Thing::$validation_rules
GP_Thing::$validation_rules_by_class
Methods
after_create (line 35)
void after_create ()

Redefinition of:
GP_Thing::after_create()
after_save (line 29)
void after_save ()

Redefinition of:
GP_Thing::after_save()
by_path (line 15)
void by_path ( $path)
  • $path
normalize_fields (line 42)
void normalize_fields ( $args)
  • $args

Redefinition of:
GP_Thing::normalize_fields()
Normalizes an array with key-value pairs representing a GP_Thing object.
path_to_root (line 136)

Gives an array of project objects starting from the current project then its parent, its parent and up to the root

  • todo: Cache the results. Invalidation is tricky, because on each project update we need to invalidate the cache for all of its children.
array path_to_root ()
regenerate_paths (line 90)

Regenrate the paths of all projects from its parents slugs

void regenerate_paths ([ $parent_project_id = null])
  • $parent_project_id
restrict_fields (line 9)
void restrict_fields ( $project)
  • $project

Redefinition of:
GP_Thing::restrict_fields()
set_difference_from (line 145)
void set_difference_from ( $other_project)
  • $other_project
source_url (line 106)
void source_url ( $file,  $line)
  • $file
  • $line
source_url_template (line 113)
void source_url_template ()
sub_projects (line 19)
void sub_projects ()
top_level (line 23)
void top_level ()
update_path (line 65)

Updates this project's and its chidlren's paths, according to its current slug.

void update_path ()

Inherited Methods

Inherited From GP_Thing

GP_Thing::__construct()
GP_Thing::after_create()
GP_Thing::after_save()
GP_Thing::all()
GP_Thing::apply_default_conditions()
GP_Thing::coerce()
GP_Thing::create()
GP_Thing::create_and_select()
GP_Thing::delete()
GP_Thing::delete_all()
GP_Thing::fields()
GP_Thing::find()
GP_Thing::find_many()
GP_Thing::find_one()
GP_Thing::force_false_to_null()
GP_Thing::found_rows()
GP_Thing::get()
GP_Thing::get_static()
GP_Thing::has_static()
GP_Thing::like_escape_printf()
GP_Thing::many()
GP_Thing::map()
GP_Thing::normalize_fields()
GP_Thing::now_in_mysql_format()
GP_Thing::one()
GP_Thing::prepare()
GP_Thing::prepare_fields_for_create()
GP_Thing::prepare_fields_for_save()
GP_Thing::query()
GP_Thing::reload()
GP_Thing::restrict_fields()
GP_Thing::save()
GP_Thing::select_all_from_conditions_and_order()
GP_Thing::set_fields()
GP_Thing::set_static()
GP_Thing::sql_condition_from_php_value()
GP_Thing::sql_from_conditions()
GP_Thing::sql_from_order()
GP_Thing::sql_limit_for_paging()
GP_Thing::update()
GP_Thing::validate()
GP_Thing::value()
GP_Thing::__call()

Documentation generated on Fri, 18 May 2012 01:46:04 +0100 by phpDocumentor 1.4.3