Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZConsultation Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| delete ( $id=false)
| get ( $id=-1)
| setShortDescription ( $desc)
| setDescription ( $desc)
| setState ( $state)
| addGroup ( $group)
| removeGroup ( $group)
| removeGroups ()
| addEmail ( $email)
| setEmail ( $emails)
| removeEmail ( $email)
| setDate ( $date)
| id ()
| shortDescription ()
| description ()
| state ()
| groupList ()
| groupIDList ()
| emailList ()
| emails ()
| notificators ()
| date ()
| personConsultationCount ( $person, $user)
| company ( $user=false)
| person ( $user=false)
| addConsultationToPerson ( $person, $user)
| addConsultationToCompany ( $company, $user)
| removeConsultationFromPerson ( $person, $user)
| removeConsultationFromCompany ( $company, $user)
| owner ( $id=-1, $is_person=true)

## Static Public Member Functions
static | findConsultationsByState ( $state)
| belongsTo ( $consultationid, $user)
static | findConsultedCompanies ( $user)
static | findConsultedPersons ( $user)
| findConsultationsByDate ( $user, $startTime, $endTime)
static | findConsultationsByContact ( $contact, $user, $OrderBy="ID", $is_person=true, $index=0, $max=-1, $relations=false)
static | findLatestConsultations ( $user, $max)
static | companyConsultationCount ( $company, $user)
static | stateName ( $state)

## Public Attributes
| $ID
| $ShortDesc
| $Description
| $State
| $Date
| $EmailNotice

## Detailed Description

! eZContact eZConsultation handles consultations with contact persons and companies.

Example code:

$consult = new eZConsultation();
$consult->setShortDescription( "Signed multi-million dollar deal with ..." );
$consult->store();
$stored_consult = new eZConsultation( $consultID );
$notificators = $stored_consult->notificators();
foreach ( $notificators as $notification )
{
print( $notification->email() );
}
eZConsultation
Definition: ezconsultation.php:60

See also
  eZPerson eZCompany eZUser

Definition at line 59 of file ezconsultation.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZConsultation::__construct | ( |  | $id = `-1` | ) |

Constructs a new eZConsultation object.

If $id is set the object's values are fetched from the database.

Definition at line 67 of file ezconsultation.php.

References $id, and $ID.

## Member Function Documentation

## ◆ addConsultationToCompany()

eZConsultation::addConsultationToCompany | ( |  | $company,
|  |  | $user
| ) |  |

Definition at line 798 of file ezconsultation.php.

References $db, $res, $user, eZDB\finish(), and eZDB\globalDatabase().

## ◆ addConsultationToPerson()

eZConsultation::addConsultationToPerson | ( |  | $person,
|  |  | $user
| ) |  |

Definition at line 781 of file ezconsultation.php.

References $db, $res, $user, eZDB\finish(), and eZDB\globalDatabase().

## ◆ addEmail()

eZConsultation::addEmail | ( |  | $email | ) |

Adds a new email to the consultation.

Definition at line 240 of file ezconsultation.php.

## ◆ addGroup()

eZConsultation::addGroup | ( |  | $group | ) |

Adds a new group to the consultation, you can either use the group id or a eZUserGroup object.

Definition at line 203 of file ezconsultation.php.

References $db, $group, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ belongsTo()

eZConsultation::belongsTo | ( |  | $consultationid,
|  |  | $user
| ) |  |
| static

Returns true if the consultation given by $consultationid belongs to $user.

Definition at line 380 of file ezconsultation.php.

References $db, $user, and eZDB\globalDatabase().

## ◆ company()

eZConsultation::company | ( |  | $user = `false` | ) |

Definition at line 719 of file ezconsultation.php.

References $db, $user, and eZDB\globalDatabase().

## ◆ companyConsultationCount()

static eZConsultation::companyConsultationCount | ( |  | $company,
|  |  | $user
| ) |  |
| static

Definition at line 687 of file ezconsultation.php.

References $db, $user, and eZDB\globalDatabase().

## ◆ date()

eZConsultation::date | ( |  | ) |

Returns the date of the consultation.

Definition at line 363 of file ezconsultation.php.

References $Date.

## ◆ delete()

eZConsultation::delete | ( |  | $id = `false` | ) |

Deletes an eZConsultation object from the database.

Definition at line 122 of file ezconsultation.php.

References $db, $id, $ID, $res, eZDB\finish(), and eZDB\globalDatabase().

Referenced by eZConsultationType\delete().

## ◆ description()

eZConsultation::description | ( |  | ) |

Returns the full description for the consultation.

Definition at line 286 of file ezconsultation.php.

References $Description.

## ◆ emailList()

eZConsultation::emailList | ( |  | ) |

Returns an array with strings, these strings each contain an email address.

Definition at line 337 of file ezconsultation.php.

References $emails.

## ◆ emails()

eZConsultation::emails | ( |  | ) |

Returns the string with email notifications, this is an unparsed form, use emailList() to get them parsed.

Definition at line 347 of file ezconsultation.php.

References $EmailNotice.

## ◆ findConsultationsByContact()

static eZConsultation::findConsultationsByContact | ( |  | $contact,
|  |  | $user,
|  |  | $OrderBy = `"ID"`,
|  |  | $is_person = `true`,
|  |  | $index = `0`,
|  |  | $max = `-1`,
|  |  | $relations = `false`
| ) |  |
| static

Finds all consultations on a specific contact person or company.

Definition at line 509 of file ezconsultation.php.

References $companyArray, $db, $index, $limit, $OrderBy, $personArray, $user, eZDB\globalDatabase(), and eZCompany\persons().

## ◆ findConsultationsByDate()

eZConsultation::findConsultationsByDate | ( |  | $user,
|  |  | $startTime,
|  |  | $endTime
| ) |  |
| static

Finds all consultations on a specific contact person or company between two timestamps.

Definition at line 457 of file ezconsultation.php.

References $db, $startTime, $user, and eZDB\globalDatabase().

## ◆ findConsultationsByState()

static eZConsultation::findConsultationsByState | ( |  | $state | ) |
| static

Finds all consultations on a specific state type.

Definition at line 372 of file ezconsultation.php.

## ◆ findConsultedCompanies()

static eZConsultation::findConsultedCompanies | ( |  | $user | ) |
| static

Finds all companies which the user has consultations with and returns an array with IDs.

Definition at line 406 of file ezconsultation.php.

References $db, $user, and eZDB\globalDatabase().

## ◆ findConsultedPersons()

static eZConsultation::findConsultedPersons | ( |  | $user | ) |
| static

Finds all persons which the user has consultations with and returns an array with IDs.

Definition at line 431 of file ezconsultation.php.

References $db, $user, and eZDB\globalDatabase().

## ◆ findLatestConsultations()

static eZConsultation::findLatestConsultations | ( |  | $user,
|  |  | $max
| ) |  |
| static

Finds the n latest consultations.

Definition at line 637 of file ezconsultation.php.

References $db, $user, and eZDB\globalDatabase().

## ◆ get()

eZConsultation::get | ( |  | $id = `-1` | ) |

Fetches the object information from the database.

Definition at line 149 of file ezconsultation.php.

References $db, $id, $ret, and eZDB\globalDatabase().

## ◆ groupIDList()

eZConsultation::groupIDList | ( |  | ) |

Returns an array with eZUserGroup IDs.

See also
  groupList

Definition at line 321 of file ezconsultation.php.

References $db, and eZDB\globalDatabase().

## ◆ groupList()

eZConsultation::groupList | ( |  | ) |

Returns an array with eZUserGroup objects, these groups are used for sending an email reply.

Definition at line 304 of file ezconsultation.php.

References $db, and eZDB\globalDatabase().

## ◆ id()

eZConsultation::id | ( |  | ) |

Returns the id for the consultation

Definition at line 270 of file ezconsultation.php.

References $ID.

## ◆ notificators()

eZConsultation::notificators | ( |  | ) |

Returns an array with eZNotification objects, this array is built from both the groupList() and the emailList().

Definition at line 356 of file ezconsultation.php.

## ◆ owner()

eZConsultation::owner | ( |  | $id = `-1`,
|  |  | $is_person = `true`
| ) |  |

Returns the owner of the consultation

Definition at line 838 of file ezconsultation.php.

References $db, $id, $ID, $res, and eZDB\globalDatabase().

## ◆ person()

eZConsultation::person | ( |  | $user = `false` | ) |

Definition at line 750 of file ezconsultation.php.

References $db, $user, and eZDB\globalDatabase().

## ◆ personConsultationCount()

eZConsultation::personConsultationCount | ( |  | $person,
|  |  | $user
| ) |  |

Definition at line 703 of file ezconsultation.php.

References $db, $user, and eZDB\globalDatabase().

## ◆ removeConsultationFromCompany()

eZConsultation::removeConsultationFromCompany | ( |  | $company,
|  |  | $user
| ) |  |

Definition at line 825 of file ezconsultation.php.

References $db, $res, $user, eZDB\finish(), and eZDB\globalDatabase().

## ◆ removeConsultationFromPerson()

eZConsultation::removeConsultationFromPerson | ( |  | $person,
|  |  | $user
| ) |  |

Definition at line 813 of file ezconsultation.php.

References $db, $res, $user, eZDB\finish(), and eZDB\globalDatabase().

## ◆ removeEmail()

eZConsultation::removeEmail | ( |  | $email | ) |

Removes an existing email from the consultation.

Definition at line 255 of file ezconsultation.php.

## ◆ removeGroup()

eZConsultation::removeGroup | ( |  | $group | ) |

Removes an existing group from the consultation.

Definition at line 221 of file ezconsultation.php.

## ◆ removeGroups()

eZConsultation::removeGroups | ( |  | ) |

Removes all groups from the consultation.

Definition at line 228 of file ezconsultation.php.

References $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## ◆ setDate()

eZConsultation::setDate | ( |  | $date | ) |

Sets the date for the consultation.

Definition at line 262 of file ezconsultation.php.

References $date.

## ◆ setDescription()

eZConsultation::setDescription | ( |  | $desc | ) |

Sets the full description for the consultation.

Definition at line 186 of file ezconsultation.php.

References $desc.

## ◆ setEmail()

eZConsultation::setEmail | ( |  | $emails | ) |

Sets the email list for the consultation.

Definition at line 247 of file ezconsultation.php.

References $emails.

## ◆ setShortDescription()

eZConsultation::setShortDescription | ( |  | $desc | ) |

Sets the short description for the consultation.

Definition at line 178 of file ezconsultation.php.

References $desc.

## ◆ setState()

eZConsultation::setState | ( |  | $state | ) |

Sets the state type for the consultation.

Definition at line 194 of file ezconsultation.php.

## ◆ shortDescription()

eZConsultation::shortDescription | ( |  | ) |

Returns the short description for the consultation

Definition at line 278 of file ezconsultation.php.

References $ShortDesc.

## ◆ state()

eZConsultation::state | ( |  | ) |

Returns the state of the consultation, this usually tells if the consultation is under negotiation, closing or similar.

Definition at line 295 of file ezconsultation.php.

References $State.

## ◆ stateName()

static eZConsultation::stateName | ( |  | $state | ) |
| static

Returns the name of the state id.

Definition at line 856 of file ezconsultation.php.

References $db, and eZDB\globalDatabase().

## ◆ store()

eZConsultation::store | ( |  | ) |

Stores the consultation to the database.

Definition at line 81 of file ezconsultation.php.

References $date, $db, $res, eZDB\finish(), and eZDB\globalDatabase().

## Member Data Documentation

## ◆ $Date

eZConsultation::$Date

Definition at line 867 of file ezconsultation.php.

Referenced by date().

## ◆ $Description

eZConsultation::$Description

Definition at line 865 of file ezconsultation.php.

Referenced by description().

## ◆ $EmailNotice

eZConsultation::$EmailNotice

Definition at line 868 of file ezconsultation.php.

Referenced by emails().

## ◆ $ID

eZConsultation::$ID

Definition at line 863 of file ezconsultation.php.

Referenced by __construct(), delete(), id(), and owner().

## ◆ $ShortDesc

eZConsultation::$ShortDesc

Definition at line 864 of file ezconsultation.php.

Referenced by shortDescription().

## ◆ $State

eZConsultation::$State

Definition at line 866 of file ezconsultation.php.

Referenced by state().

The documentation for this class was generated from the following file:

- ezconsultation.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.