Preferences
extends BaseController
in package
Preferences Class
Table of Contents
- MODULE_ID = 21
- $objects : Objects
- Contains the whole set of objects by request
- $page : Page
- Contains the Page object
- $planet : array<string|int, mixed>
- Contains the current planet data
- $template : Template
- Contains the Template object
- $user : array<string|int, mixed>
- Contains the current user data
- $userLibrary : User
- Contains the User object
- $error : string
- Contains an error message
- $fields_to_update : array<string|int, mixed>
- List of fields to update
- $post : bool
- Stores if data was sent
- $preferences : Preferences
- Reference to Preferences library
- __construct() : mixed
- Constructor
- index() : void
- Users land here
- loadLang() : void
- Load a language file using CI Library
- loadModel() : void
- Load the provided model, support a dir path
- getObjects() : array<string|int, mixed>
- Will be removed
- getPlanetData() : array<string|int, mixed>
- Will be removed
- getTemplate() : array<string|int, mixed>
- Will be removed
- getUserData() : array<string|int, mixed>
- Will be removed
- buildPage() : void
- Build the page
- runAction() : void
- Run an action
- setDeleteMode() : array<string|int, mixed>
- Set the delete mode data for the view
- setMessageDisplay() : array<string|int, mixed>
- Display the message block
- setUpPreferences() : void
- Creates a new preferences object that will handle all the preferences creation methods and actions
- setUserData() : array<string|int, mixed>
- Set the user data for the view
- setVacationMode() : array<string|int, mixed>
- Set the vacation mode data for the view
- sortPlanetOptions() : array<string|int, mixed>
- Returns an array with the different options to sort a planet
- sortSequenceOptions() : array<string|int, mixed>
- Returns an array with the different sequence options to sort a planet
- validateDeleteMode() : void
- Validate delete mode
- validateNewEmail() : void
- Validate new email
- validateNewPassword() : void
- Validate new password
- validateNewUserName() : void
- Validate new user name
- validatePlanetSort() : void
- Validate planet sort
- validatePlanetSortSequence() : void
- Validate planet sort sequence
- validateSpyProbes() : void
- Validate spy probes
- validateVacationMode() : void
- Validate vacation mode
Constants
MODULE_ID
public
mixed
MODULE_ID
= 21
Properties
$objects
Contains the whole set of objects by request
protected
Objects
$objects
$page
Contains the Page object
protected
Page
$page
= null
$planet
Contains the current planet data
protected
array<string|int, mixed>
$planet
= []
$template
Contains the Template object
protected
Template
$template
= null
$user
Contains the current user data
protected
array<string|int, mixed>
$user
= []
$userLibrary
Contains the User object
protected
User
$userLibrary
= null
$error
Contains an error message
private
string
$error
= ''
$fields_to_update
List of fields to update
private
array<string|int, mixed>
$fields_to_update
= []
$post
Stores if data was sent
private
bool
$post
= false
$preferences
Reference to Preferences library
private
Preferences
$preferences
= null
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —index()
Users land here
public
index() : void
Return values
void —loadLang()
Load a language file using CI Library
public
loadLang(string|array<string|int, mixed> $language_file) : void
Parameters
- $language_file : string|array<string|int, mixed>
Return values
void —loadModel()
Load the provided model, support a dir path
public
loadModel(string $class) : void
Parameters
- $class : string
-
Mandatory field, if not will throw an exception
Tags
Return values
void —getObjects()
Will be removed
protected
getObjects() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getPlanetData()
Will be removed
protected
getPlanetData() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getTemplate()
Will be removed
protected
getTemplate() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getUserData()
Will be removed
protected
getUserData() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —buildPage()
Build the page
private
buildPage() : void
Return values
void —runAction()
Run an action
private
runAction() : void
Return values
void —setDeleteMode()
Set the delete mode data for the view
private
setDeleteMode() : array<string|int, mixed>
Return values
array<string|int, mixed> —setMessageDisplay()
Display the message block
private
setMessageDisplay() : array<string|int, mixed>
Return values
array<string|int, mixed> —setUpPreferences()
Creates a new preferences object that will handle all the preferences creation methods and actions
private
setUpPreferences() : void
Return values
void —setUserData()
Set the user data for the view
private
setUserData() : array<string|int, mixed>
Return values
array<string|int, mixed> —setVacationMode()
Set the vacation mode data for the view
private
setVacationMode() : array<string|int, mixed>
Return values
array<string|int, mixed> —sortPlanetOptions()
Returns an array with the different options to sort a planet
private
sortPlanetOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —sortSequenceOptions()
Returns an array with the different sequence options to sort a planet
private
sortSequenceOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —validateDeleteMode()
Validate delete mode
private
validateDeleteMode(array<string|int, mixed> $preferences) : void
Parameters
- $preferences : array<string|int, mixed>
Return values
void —validateNewEmail()
Validate new email
private
validateNewEmail(array<string|int, mixed> $preferences) : void
Parameters
- $preferences : array<string|int, mixed>
Return values
void —validateNewPassword()
Validate new password
private
validateNewPassword(array<string|int, mixed> $preferences) : void
Parameters
- $preferences : array<string|int, mixed>
Return values
void —validateNewUserName()
Validate new user name
private
validateNewUserName(array<string|int, mixed> $preferences) : void
Parameters
- $preferences : array<string|int, mixed>
Return values
void —validatePlanetSort()
Validate planet sort
private
validatePlanetSort(array<string|int, mixed> $preferences) : void
Parameters
- $preferences : array<string|int, mixed>
Return values
void —validatePlanetSortSequence()
Validate planet sort sequence
private
validatePlanetSortSequence(array<string|int, mixed> $preferences) : void
Parameters
- $preferences : array<string|int, mixed>
Return values
void —validateSpyProbes()
Validate spy probes
private
validateSpyProbes(array<string|int, mixed> $preferences) : void
Parameters
- $preferences : array<string|int, mixed>
Return values
void —validateVacationMode()
Validate vacation mode
private
validateVacationMode() : void