The following methods are used for managing Files within a project.
object ActiveCollab::findFileById(int $project_id, int $file_id) - Fetches an ActiveCollabFile object
Parameters:
project_id - d of a project which the file is in file_id - id of a specific file
Return value: Object instance of ActiveCollabFile
object $file = new ActiveCollabFile(int $project_id) - Creates new a ActiveCollabFile object
Parameters:
project_id - id of the project where the file is going to be created
Variable value: Object instance of ActiveCollabFile
These methods are called out through an file object.
• setCreatedByEmail(string $email) - Sets an email of the user who created this file
• setCreatedByName(string $name) - Sets the name of the user who created this file
• setName(string $name) - Sets the name of this file
• setBody(string $body) - Sets the description of this file
• setTags(array of string $tagArr) - Sets tags for this file
• setVisibility(int $visibility) - Sets the visibility of this file; the visibility parameter can be a combination of the following constants: ACTIVECOLLAB_VISIBILITY_PRIVATE, ACTIVECOLLAB_VISIBILITY_NORMAL
• setParentId(int $parent_id) - Sets the parent for this file
• setMilestoneId(int $milestone_id) - Sets the milestone for this file
• addFile(file $file) - Uploads an file and bounds it to a ActiveCollabFile object
• getRevisions(void) - Returns revisions of this file
• save(void) - Saves the file object into activeCollab