PlantHandler

This class contains the functions to perform the following:

  • Retrieve, Insert and Update Plants
  • Set the Plant Export Flag

api
package simPROAPI
subpackage Staff
author Nathan Muir, Isaac Martin
version 2014-06-23
uses \global\StaffHandler

 Methods

PlantRetrieve

Retrieve(mixed $CompanyID, int $PlantID) : array
Static

This function retrieves a plant with a specific Plant ID

uses \PlantHandler::RetrieveList()

Parameters

$CompanyID

mixed

the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.

$PlantID

int

plant id

Returns

array

PlantRetrieveList

RetrieveList(mixed $CompanyID, array $PlantIDs, array $Detail = array()) : array
Static

This function retrieves details on the provided list of plant ids

uses \StaffHandler::RetrieveList()
used_by \PlantHandler::Search()
used_by \PlantHandler::SearchFields()
used_by \PlantHandler::Retrieve()

Parameters

$CompanyID

mixed

the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.

$PlantIDs

array

list of Plant ID's to retrieve.

$Detail = array()

array

the specification of which details to return - ("Zones","Departments"). Null/Empty/Empty array will return none.

Returns

array

PlantSearchFields

SearchFields(mixed $CompanyID, array $SearchTerms) : array
Static

This function retrieve's a list of plants who's set of fields match their associated values

Implemented Search Terms are: ZoneID, ZoneName, PlantTypeID, PlantTypeName

uses \PlantHandler::RetrieveList()

Parameters

$CompanyID

mixed

the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.

$SearchTerms

array

An associative array of Search Fields[key] and their search terms [value]

Returns

array

PlantTypesRetrieve

TypesRetrieve(mixed $CompanyID) : array
Static

This function retrieves plant types

Parameters

$CompanyID

mixed

the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.

Returns

array