In this article we will describe the methods that can allow you to manage companies in your installation of activeCollab.

1. Fetching a company

object ActiveCollab::findCompanyById( int $company_id) - Fetches the ActiveCollabCompany object

Parameters:

company_id - id of a specific company

Return value: Object instance of ActiveCollabCompany

2. Creating a new company

object $company = new ActiveCollabCompany( void ) - Creates a new ActiveCollabCompany object

Variable value: Object instance of ActiveCollabCompany

3. Editing and saving a company

These methods are called out through a company object:

•   setName(string $name)  -  Sets the name of the company
•   setOfficeAddress(string $address) - Sets the address of the company 
•   setOfficePhone(string $phone) - Sets the phone of the company 
•   setOfficeFax(string $fax) - Sets the fax of the company 
•   setOfficeHomepage(string $homepage) - Sets the homepage of the company 
•   save(void) - Saves the company object into activeCollab
•   delete(void) - Deletes the company from activeCollab