Contribution Class Reference

Inheritance diagram for Contribution:
BackboneModel

List of all members.

Public Member Functions

 Contribution ($data)
 toArray ()
 create ()
 update ()
 delete ()
 exists ()
 getCacheId ()
 getId ()
 getRevId ()
 getTitle ()
 getName ()
 getUrl ()
 belongsToProject ($project)
 getProjects ()
 getAuthors ()
 getPeople ()
 getParent ()
 getPartners ()
 getTypeFor ($partner)
 getHumanReadableTypeFor ($partner)
 getHumanReadableSubTypeFor ($partner)
 getContactFor ($partner)
 getIndustryFor ($partner)
 getLevelFor ($partner)
 getByType ($type, $partner=null)
 getCash ()
 getCashFor ($partner)
 getKind ()
 getKindFor ($partner, $subType="")
 getTotal ()
 getTotalFor ($partner)
 getDescription ()
 getInstitution ()
 getProvince ()
 getAccessId ()
 getYear ()
 getStartYear ()
 getEndYear ()
 getStartDate ()
 getEndDate ()
 getNYears ()
 getDate ()
 isAllowedToEdit ($me=null)

Static Public Member Functions

static newFromId ($id)
static newFromName ($name)
static newFromRevId ($id)
static getAllContributions ()
static search ($phrase, $category='all')
static getContributionsDuring ($type, $startDate, $endDate=-1)
static getAllCustomPartners ()

Public Attributes

 $id
 $name
 $rev_id
 $people = array()
 $peopleWaiting = true
 $projects
 $projectsWaiting = true
 $partners
 $partnersWaiting = true
 $type
 $cash = array()
 $kind = array()
 $description
 $institution
 $province
 $access_id
 $start_date
 $end_date
 $date

Static Public Attributes

static $cache = array()
static $typeMap
static $inkindMap
static $cashMap
static $subTypeMap = array()

Member Function Documentation

Contribution::create (  ) 

Creates a new record in the DB for this BackboneModel

Returns:
boolean Returns whether or not the creation was successful or not

Reimplemented from BackboneModel.

Contribution::delete (  ) 

Deletes the record in the DB for this BackboneModel

Returns:
boolean Returns whether or not the deletion was successful or not

Reimplemented from BackboneModel.

Contribution::exists (  ) 

Returns whether or not this BackboneModel exists or not

Returns:
boolean Returns whether or not this BackboneModel exists or not

Reimplemented from BackboneModel.

Contribution::getAccessId (  ) 

Returns the access id of this Contribution

Returns:
int The user id who has access to this Contribution
Contribution::getCacheId (  ) 

Returns the id of this BackboneModel's cache

Returns:
string Returns the id of this BackboneModel's cache

Reimplemented from BackboneModel.

Contribution::getDate (  ) 

Returns the last time this Contribution was changed

Returns:
string The last time this Contribution was changed
Contribution::getEndDate (  ) 

Returns the End Date of this Contribution

Returns:
string The End Date of this Contribution
Contribution::getEndYear (  ) 

Returns the end year of this Contribution return int The end year of this Contribution

Contribution::getId (  ) 
Returns:
int Returns the id of this BackboneModel

Reimplemented from BackboneModel.

Contribution::getNYears (  ) 

Returns how many years this Contribution spans

Returns:
int How many years this Contribution spans
Contribution::getStartDate (  ) 

Returns the Start Date of this Contribution

Returns:
string The Start Date of this Contribution
Contribution::getStartYear (  ) 

Returns the start year of this Contribution return int The start year of this Contribution

Contribution::isAllowedToEdit ( me = null  ) 

Returns whether or not this logged in user can edit this Contribution

Contribution::toArray (  ) 

Generates and returns an array version of this BackboneModel

Returns:
array Returns an array version of this BackboneModel

Reimplemented from BackboneModel.

Contribution::update (  ) 

Updates the record in the DB for this BackboneModel

Returns:
boolean Returns whether or not the update was successful or not

Reimplemented from BackboneModel.


Member Data Documentation

Contribution::$cashMap [static]
Initial value:
 array("1a" => "Salaries: Bachelors - Canadian and Permanent Residents",
                            "1b" => "Salaries: Bachelors - Foreign",
                            "1c" => "Salaries: Masters - Canadian and Permanent Residents",
                            "1d" => "Salaries: Masters - Foreign",
                            "1e" => "Salaries: Doctorate - Canadian and Permanent Residents",
                            "1f" => "Salaries: Doctorate - Foreign",
                            "2a" => "Salaries: Post-doctoral - Canadian and Permanent residents",
                            "2b" => "Salaries: Post-doctoral - Foreign",
                            "2c" => "Salaries: Other",
                            "3"  => "Salary and benefits of incumbent (Canada Research Chairs only)",
                            "4"  => "Professional and technical services/contracts",
                            "5"  => "Equipment (incl. powered vehicles)",
                            "6"  => "Materials, supplies and other expenditures",
                            "7"  => "Travel",
                            "8"  => "Other expenditures")
Contribution::$inkindMap [static]
Initial value:
 array("equi" => "Equipment, Software",
                              "mate" => "Materials",
                              "logi" => "Logistical Support of Field Work",
                              "srvc" => "Provision of Services",
                              "faci" => "Use of Company Facilites",
                              "sifi" => "Salaries of Scientific Staff",
                              "mngr" => "Salaries of Managerial and Administrative Staff",
                              "trvl" => "Project-related Travel",
                              "othe" => "Other")
Contribution::$typeMap [static]
Initial value:
 array("none" => "None",
                            "cash" => "Cash",
                            "caki" => "Cash and In-Kind",
                            "inki" => "In-Kind",
                            "grnt" => "Grant",
                            "char" => "Research Chair",
                            "scho" => "Scholarship",
                            "cont" => "Contract",
                            "fell" => "Fellowship")

The documentation for this class was generated from the following file:

Generated on 9 Jan 2025 for The Forum by  doxygen 1.6.1