portal/include/Portal/Portal.php
\Portal
Properties
Methods

addModulesIfFunctionExists(
$function, $modules, $checkPortal
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $function | ||
| $modules | ||
| $checkPortal |

checkPortalStatus(
$function
)
:
voidDo some checking to see if the parent instance is still alive
| Name | Type | Description |
|---|---|---|
| $function |

getEntries(
\module $module, \where $where, \orderBy $orderBy, \offset $offset
=
0, \limit $limit
=
20
)
:
arrayRetrieves a list of entries
| Name | Type | Description |
|---|---|---|
| $module | \module | string the module to retrieve |
| $where | \where | string where clause to use |
| $orderBy | \orderBy | string order by clause |
| $offset | \offset | int offset |
| $limit | \limit | int number of records to retrieve |
| Type | Description |
|---|---|
| array | result |

getEntry(
\module $module, \id $id, \fields $fields
)
:
arraygets a single entry
| Name | Type | Description |
|---|---|---|
| $module | \module | string the module to retrieve |
| $id | \id | guid id of the record |
| $fields | \fields | array fields to return |
| Type | Description |
|---|---|
| array | result |

getFields(
\module $module, \reformatted $reformatted
=
false
)
:
arrayreturns the fields for a module and caches, or returns the cached version
| Name | Type | Description |
|---|---|---|
| $module | \module | string the module to save |
| $reformatted | \reformatted | bool return as soap would or return as name => values |
| Type | Description |
|---|---|
| array | fields |

getImages(
\$images $images
)
:
voidgetImages This method retrieves and caches a copy of each image URL link specified in the $images Array parameter
| Name | Type | Description |
|---|---|---|
| $images | \$images | Array of image URL links to retrieve and cache |

getKBDocumentBody(
\$id $doc_id
)
:
\$resultgetKBDocumentBody This function returns the String portion of the KBDocument's content
| Name | Type | Description |
|---|---|---|
| $doc_id | \$id | The document id to search with |
| Type | Description |
|---|---|
| \$result | The document body value |

getRelated(
\module $module, \recordId $rel_module, \fields $recordId, $fields, $orderBy
=
'', $offset
=
0, $limit
=
-1
)
:
arraygets the related notes of a record
| Name | Type | Description |
|---|---|---|
| $module | \module | string the module to retrieve |
| $rel_module | \recordId | guid the guid of the record of the parent module |
| $recordId | \fields | array fields to return |
| $fields | ||
| $orderBy | ||
| $offset | ||
| $limit |
| Type | Description |
|---|---|
| array | result |

handleResult(
$result
)
:
voidHandles the result of any soap requests, checks for errors etc
| Name | Type | Description |
|---|---|---|
| $result |

leadLogin(
$name, $password
)
:
voidlogin for lead portal entry point
| Name | Type | Description |
|---|---|---|
| $name | ||
| $password |

loadSoapClient(
)
:
voidloadSoapClient connects and loads the WSDL file to instantiate a nusoapclient instance

login(
\name $name, \password $password, \contactName $contactName, \contactPassword $contactPassword
)
:
stringlogins into the app
| Name | Type | Description |
|---|---|---|
| $name | \name | string user name of the portal user in the parent crm install |
| $password | \password | string password for the user the portal user in the parent crm install |
| $contactName | \contactName | string portal username of the contact logging in |
| $contactPassword | \contactPassword | string portal password of the contact logging in |
| Type | Description |
|---|---|
| string | soad session id |

relateNote(
\noteId $noteId, \relatedToModuleName $relateToModuleName, \recordId $recordId
)
:
arraysets the related note
| Name | Type | Description |
|---|---|---|
| $noteId | \noteId | guid guid of the note |
| $relateToModuleName | \relatedToModuleName | parent module of the ntoe |
| $recordId | \recordId | guid the guid of the record of the parent module |
| Type | Description |
|---|---|
| array | result |

save(
\module $module, \nameValues $nameValues
)
:
arraysaves a record
| Name | Type | Description |
|---|---|---|
| $module | \module | string the module to save |
| $nameValues | \nameValues | array name values of the fields to save |
| Type | Description |
|---|---|
| array | result |

setAttachmentToNote(
$noteId, $fileLocation, $filename
)
:
void| Name | Type | Description |
|---|---|---|
| $noteId | ||
| $fileLocation | ||
| $filename |