\Backend

Summary

Methods
Properties
Constants
__construct()
index()
customers()
services()
users()
settings()
setUserData()
update()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
hasPrivileges()
No private properties found
N/A

Methods

__construct()

__construct() 

index()

index(string  $appointment_hash = '') 

Display the main backend page.

This method displays the main backend page. All users login permission can view this page which displays a calendar with the events of the selected provider or service. If a user has more priviledges he will see more menus at the top of the page.

Parameters

string $appointment_hash

If given, the appointment edit dialog will appear when the page loads.

customers()

customers() 

Display the backend customers page.

In this page the user can manage all the customer records of the system.

services()

services() 

Displays the backend services page.

Here the admin user will be able to organize and create the services that the user will be able to book appointments in frontend.

NOTICE: The services that each provider is able to service is managed from the backend services page.

users()

users() 

Display the backend users page.

In this page the admin user will be able to manage the system users. By this, we mean the provider, secretary and admin users. This is also the page where the admin defines which service can each provider provide.

settings()

settings() 

Display the user/system settings.

This page will display the user settings (name, password etc). If current user is an administrator, then he will be able to make change to the current Easy!Appointment installation (core settings like company name, book timeout etc).

setUserData()

setUserData(array  $view) 

Set the user data in order to be available at the view and js code.

Parameters

array $view

Contains the view data.

update()

update() 

This method will update the installation to the latest available version in the server. IMPORTANT: The code files must exist in the server, this method will not fetch any new files but will update the database schema.

This method can be used either by loading the page in the browser or by an ajax request. But it will answer with json encoded data.

hasPrivileges()

hasPrivileges(string  $page, boolean  $redirect = TRUE) : boolean

Check whether current user is logged in and has the required privileges to view a page.

The backend page requires different privileges from the users to display pages. Not all pages are avaiable to all users. For example secretaries should not be able to edit the system users.

Parameters

string $page

This argument must match the roles field names of each section (eg "appointments", "users" ...).

boolean $redirect

(OPTIONAL - TRUE) If the user has not the required privileges (either not logged in or insufficient role privileges) then the user will be redirected to another page. Set this argument to FALSE when using ajax.

Returns

boolean —

Returns whether the user has the required privileges to view the page or not. If the user is not logged in then he will be prompted to log in. If he hasn't the required privileges then an info message will be displayed.