SiteHandler
This class contains the functions to perform the following:
api | |
---|---|
package | simPROAPI |
subpackage | Sites |
author | Nathan Muir |
version | 2011-07-18 |
ContactInsert(int $CompanyID, int $SiteID, array $SiteContactDetails) : bool
<?php
array_keys($SiteContactDetails) == array(
"FirstName",
"LastName",
"Position",
"PhoneNumber",
"Mobile",
"Fax",
"Email"
);
?>
int
the company id
int
the site to add the contact to.
array
an associative array of site contacts' information.
bool
ContactRetrieve(int $CompanyID, int $SiteID, int $ContactID = null) : array
uses | \SiteHandler::ContactRetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
int
the site id, to retrieve Site Contacts for
int
the Contact ID.
array
ContactRetrieveList(int $CompanyID, array $SiteIDs) : array
used_by | \SiteHandler::ContactRetrieve() |
---|
int
the Company ID. In single company builds, this is 0.
array
list of Site ID's to retrieve Site Contacts for
array
Insert(int $CompanyID, array $SiteDetails) : int
<?php
array_keys($SiteDetails) == array (
'SiteName',
'Address',
'Suburb',
'State',
'Postcode',
'Country',
'MailAddress',
'MailSuburb',
'MailState',
'MailPostcode',
'ContactFirstName',
'ContactLastName',
'ContactPosition',
'Phone',
'Mobile',
'Fax',
'Email',
'Notes',
'ZoneName',
'ZoneID',
'CertificationDay',
'CertificationMonth',
'PostalContact',
'MailCompanyInclude',
'CustomFields'
);
?>
int
the company id
array
an associative array of site information.
int
PreferredTechnician(int $CompanyID, int $SiteID) : array
int
the Company ID. In single company builds, this is 0.
int
retrieve details for the specified id
array
Retrieve(int $CompanyID, int $SiteID) : array
uses | \SiteHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
int
retrieve details for the specified id
array
RetrieveList(int $CompanyID, array $SiteIDs) : array
used_by | \CustomerHandler::SiteRetrieveList() |
---|---|
used_by | \SiteHandler::Search() |
used_by | \SiteHandler::SearchFields() |
used_by | \SiteHandler::Retrieve() |
int
the Company ID. In single company builds, this is 0.
array
list of Site ID's to retrieve details for
array
Search(int $CompanyID, string $Search = '', int $Limit = 500, int $Offset = 0) : array
This function retrieve's a list of sites who's name matches the search term.
uses | \SiteHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
string
The search text for the location name. Can use % for wildcards.
int
the total number of sites to return (0 - 500)
int
how many results to skip, before returning {@link $Limit}
array
SearchFields(int $CompanyID, array $SearchTerms) : array
This function retrieve's a list of sites who's set of fields match their associated values
Implemented Search Terms are: Address,Suburb,State,Postcode,Zone,ZoneName
uses | \SiteHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
array
An associative array of Search Fields[key] and their search terms [value]
array
Update(int $CompanyID, int $SiteID, array $SiteDetails) : bool
<?php
array_keys($SiteDetails) == array (
'SiteName',
'Address',
'Suburb',
'State',
'Postcode',
'Country',
'MailAddress',
'MailSuburb',
'MailState',
'MailPostcode',
'ContactFirstName',
'ContactLastName',
'ContactPosition',
'Phone',
'Mobile',
'Fax',
'Email',
'Notes',
'ZoneName',
'ZoneID',
'CertificationDay',
'CertificationMonth',
'MailContact',
'MailCompanyInclude',
'CustomFields'
);
?>
int
the company id
int
The site to update.
array
an associative array of site information.
bool
ValueForecast(int $CompanyID, int $SiteID, string $StartDate, string $EndDate) : array
Performs a value forecast on a site.
int
the company id
int
the site to perform the Value Forcast for
string
Date start (inclusive) to search. {@link http://php.net/manual/en/function.strtotime.php}
string
Date end (inclusive) to search. {@link http://php.net/manual/en/function.strtotime.php}
array