Project Class Reference

Inheritance diagram for Project:
BackboneModel

List of all members.

Public Member Functions

 generateProjectCache ()
 Project ($data)
 toArray ()
 create ()
 update ()
 delete ()
 exists ()
 getCacheId ()
 getId ()
 getEvolutionId ()
 getName ()
 getFullName ()
 getShortFullName ()
 getStatus ()
 getType ()
 isPrivate ()
 isFeatureFrozen ($feature)
 getPhase ($name=false)
 getPreds ()
 getAllPreds ()
 getSuccs ()
 getAllSuccs ()
 getUrl ()
 getLastHistoryId ()
 isDeleted ()
 getCreated ()
 getDeleted ()
 getEffectiveDate ()
 getStartDate ()
 getEndDate ()
 getAllPeople ($filter=null)
 getAllPeopleDuring ($filter=null, $startRange=false, $endRange=false, $includeManager=false)
 getAllPeopleOn ($filter, $date, $includeManager=false)
 getImage ($n)
 getContributions ()
 getContributionsDuring ($startYear, $endYear=null)
 getMultimedia ()
 getMultimediaDuring ($start, $end)
 getContacts ()
 getLeaders ($onlyid=false)
 userCanEdit ()
 getChallenge ()
 getChallenges ()
 getTheme ()
 getActivity ()
 getDescription ($history=false)
 getLongDescription ($history=false)
 getWebsite ($history=false)
 getWikiPages ()
 getFiles ()
 getUpToDate ($year)
 saveUpToDate ($year, $value)
 getTechnology ()
 saveTechnology ()
 getPolicy ()
 savePolicy ()
 getPapers ($category="all", $startRange=false, $endRange=false)
 getTopProductsLastUpdated ()
 getTopProducts ()
 getEvaluators ($year, $type='Project')
 getStartDates ()
 getJoinDate ($person)
 getEndDates ()
 getLeaveDate ($person)
 getActivities ()
 getMilestones ($history=false, $fesMilestones=false)
 isSubProject ()
 getSubProjects ()
 getSubProjectsDuring ($startDate, $endDate)
 getParent ()
 getMilestonesDuring ($year='0000', $fesMilestones=false)
 getMilestonesCreated ($date='0000-00-00', $fesMilestones=false)
 getAllocatedAmount ($year)

Static Public Member Functions

static newFromId ($id)
static newFromName ($name)
static newFromHistoricId ($id, $evolutionId=null)
static newFromHistoricName ($name)
static getAllProjects ($subProjects=false)
static getAllProjectsDuring ($startDate, $endDate, $subProjects=false)
static getAllProjectsEver ($subProjects=false, $historic=false)
static areThereDeletedProjects ()
static areThereAdminProjects ()
static areThereNonAdminProjects ()
static areThereInnovationHubs ()
static areThereProposedProjects ()

Public Attributes

 $id
 $evolutionId
 $fullName
 $name
 $status
 $creationDate
 $startDate
 $endDate
 $type
 $private
 $parentId
 $people
 $phase
 $contributions
 $multimedia
 $startDates
 $endDates
 $comments
 $milestones
 $budgets
 $deleted
 $effectiveDate
 $themes
 $subProjects

Static Public Attributes

static $cache = array()
static $projectCache = array()
static $projectDataCache = array()

Member Function Documentation

Project::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.

Project::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.

Project::exists (  ) 

Returns whether or not this BackboneModel exists or not

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

Reimplemented from BackboneModel.

Project::getActivity (  ) 

For AI4Society: Returns this Project's activity

Project::getAllocatedAmount ( year  ) 

Returns the allocated amount that this Project received for the specified $year If the data is not in the DB then it falls back to checking the uploaded revised budgets

Parameters:
int $year The allocation year
Returns:
int The amount of allocation
static Project::getAllProjects ( subProjects = false  )  [static]

Returns all of the current Projects from the database

Parameters:
boolean $subProjects Whether or not to include sub-projects
Returns:
array An array of Projects
Project::getCacheId (  ) 

Returns the id of this BackboneModel's cache

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

Reimplemented from BackboneModel.

Project::getChallenge (  ) 

Returns the first Challenge for this Project

Project::getContacts (  ) 

Returns an array of CRMContacts that belong to this Project

Returns:
array The array of CRMContacts that belong to theis Project
Project::getEvaluators ( year,
type = 'Project' 
)

Returns an array of Evaluators who are evaluating this Project

Parameters:
string $year The evaluation year string $type The type of evaluation
Returns:
array The array of Evaluators who are evaluating this Project during $year
Project::getFiles (  ) 

Returns an array of file Articles that belong to this Project

Returns:
array Returns an array of file Articles that belong to this Project
Project::getId (  ) 
Returns:
int Returns the id of this BackboneModel

Reimplemented from BackboneModel.

Project::getImage ( n  ) 

Returns the path to a photo of this Project if it exists

Parameters:
integer $n Which image to get
Returns:
string The path to a photo of this Project
Project::getLeaders ( onlyid = false  ) 

Returns an array with the leaders of the project. By default, the resulting array contains instances of Person. If onlyid is set to true, then the resulting array contains only numerical user IDs.

Project::getPolicy (  ) 

Returns an array containing responses for Government Policy

Project::getShortFullName (  ) 

Returns a shortened version of the full name (first 3 words, or text before a colon)

Project::getSubProjects (  ) 

Returns an array of this Project's current Sub-Projects

Returns:
array An array of this Project's current Sub-Projects
Project::getSubProjectsDuring ( startDate,
endDate 
)

Returns an array of Sub-Projects during the given date range

Parameters:
string $startDate The start date of the range
string $endDate The end date of the range
Returns:
array An array of Sub-Projects during the given date range
Project::getTechnology (  ) 

Returns an array containing responses for Technology Evaluation/Adoption

Project::getTheme (  ) 

For AI4Society: Returns this Project's theme

Project::getUpToDate ( year  ) 

Returns an array containing responses for being 'Up to date'

Project::getWikiPages (  ) 

Returns an array of Articles that belong to this Project

Returns:
array Returns an array of Articles that belong to this Project
Project::isFeatureFrozen ( feature  ) 

Returns whether or not the given feature is frozen

Parameters:
string $feature The feature to check
Returns:
boolean Whether or not the given feature is frozen
static Project::newFromHistoricId ( id,
evolutionId = null 
) [static]

Returns a new Project from the given historic id

Parameters:
integer $id The historic id of the project
integer $evolutionId The id of the evolution entry
Returns:
Project The Project with the given historic id
static Project::newFromHistoricName ( name  )  [static]

Returns a new Project from the given historic name

Parameters:
string $name The historic name of the Project
Returns:
Project The Project with the given historic name
static Project::newFromId ( id  )  [static]

Returns a new Project from the given id

Parameters:
integer $id The id of the project
Returns:
Project The Project with the given id
static Project::newFromName ( name  )  [static]

Returns a new Project from the given name

Parameters:
string $name The name of the Project
Returns:
Project The Project with the given name
Project::savePolicy (  ) 

Saves the array containing responses for Government Policy

Project::saveTechnology (  ) 

Saves the array containing responses for Technology Evaluation/Adoption

Project::saveUpToDate ( year,
value 
)

Saves the array containing responses for being 'Up to date'

Project::toArray (  ) 

Generates and returns an array version of this BackboneModel

Returns:
array Returns an array version of this BackboneModel

Reimplemented from BackboneModel.

Project::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.

Project::userCanEdit (  ) 

Returns whether or not the logged in user can edit this project

Returns:
boolean Whether or not the logged in user can edit this project

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

Generated on 9 Jan 2025 for The Forum by  doxygen 1.6.1