Public Member Functions | |
SpecialList () | |
Class constructor. | |
fillWithDatabase () | |
Fill in the list using the database. | |
databaseItemExists ($specialId, $name) | |
Check if a speciality exists. | |
databaseInsertItem ($name) | |
Insert a new speciality. | |
databaseUpdateItem ($specialId, $newName) | |
Update an existing speciality. | |
databaseDeleteItemsExcluding ($idArray) | |
Delete an existing speciality. | |
Public Attributes | |
$emptyListMessage = "There are no specialities to display." | |
The empty list message. | |
$alreadyExistsMessage = "Sorry, that speciality already exists. Please choose a different name." | |
The already existing message. |
This class can generate dynamic speciallists in an HTML form.
SpecialList::SpecialList | ( | ) |
SpecialList::fillWithDatabase | ( | ) |
Fill in the list using the database.
This function is responsible for filling in the list using data from the database.
SpecialList::databaseItemExists | ( | $ | specialId, | |
$ | name | |||
) |
Check if a speciality exists.
This function returns boolean true if a speciality exists.
specialId | The speciality ID to search for. | |
name | The name of the speciality to search for. |
SpecialList::databaseInsertItem | ( | $ | name | ) |
Insert a new speciality.
This function will insert a new speciality in the database.
SpecialList::databaseUpdateItem | ( | $ | specialId, | |
$ | newName | |||
) |
Update an existing speciality.
This function will update an existing speciality in the database.
specialId | The specialId of the speciality. | |
newName | The new name of the speciality. |
SpecialList::databaseDeleteItemsExcluding | ( | $ | idArray | ) |
Delete an existing speciality.
This function is responsible for removing an speciality from the database.
name | The name of the speciality. |
SpecialList::$emptyListMessage = "There are no specialities to display." |
The empty list message.
SpecialList::$alreadyExistsMessage = "Sorry, that speciality already exists. Please choose a different name." |
The already existing message.