abstract public
hrm\setting\base\SettingEditor
|
#
newSettingObject( )
Creates and returns a new Setting
Creates and returns a new Setting
This is an abstract function and must be reimplemented.
Returns
|
abstract public
string
|
#
table( )
Returns the name of the database table in which the Settings are stored.
Returns the name of the database table in which the Settings are stored.
This must be reimplemented.
Returns
string The table name.
|
public
array
|
#
settings( )
Loads and returns all the Settings for current user (but does not load
the Parameter values)
Loads and returns all the Settings for current user (but does not load
the Parameter values)
Returns
array The array of Settings.
|
public
hrm\setting\base\Setting
|
#
setting( string $name )
Returns the Setting with given name.
Returns the Setting with given name.
Parameters
- $name
- Name of the Setting.
Returns
|
public
string|null
|
#
selected( )
Returns the name of the currently selected Setting or NULL if none is
selected.
Returns the name of the currently selected Setting or NULL if none is
selected.
Returns
string|null The name of the selected Setting or NULL.
|
public
|
#
setSelected( string $name )
Sets the Setting with given name as selected.
Sets the Setting with given name as selected.
Parameters
- $name
- Name of the Setting to be selected.
|
public
string
|
#
user( )
Returns the name of the User.
Returns the name of the User.
Returns
string The name of the User.
|
public
hrm\setting\base\Setting
|
#
createNewSetting( string $name )
Create and set a new Setting with given name.
Create and set a new Setting with given name.
If a Setting with the same name already exists, return NULL. Otherwise,
the new Setting is set into the Editor and also returned.
Parameters
- $name
- Name of the Setting to be created.
Returns
|
public
boolean
|
#
copySelectedSetting( string $newName )
Creates a new Setting with the given new name in the database and copies
the Parameter values of the existing Parameter to it.
Creates a new Setting with the given new name in the database and copies
the Parameter values of the existing Parameter to it.
Parameters
- $newName
- The name of the new Setting.
Returns
boolean True if the copy was successful, false otherwise.
|
public
boolean
|
#
huTemplate2hrmTemplate( hrm\setting\base\Setting $setting, string $huTemplate )
Populates a setting based on parsing the raw file string of a Huygens
template.
Populates a setting based on parsing the raw file string of a Huygens
template.
Parameters
- $setting
- The setting object to fill.
- $huTemplate
- The raw contents of the template file.
Returns
boolean True if the new template creation was successful, false
otherwise.
Todo
This method always returns false: it should return true at the end
and also interpret the output of the call to HuygensTools::askHuCore()
to decide whether it was successful or not!
|
public
boolean
|
#
shareSelectedSetting( string $templateName, array $recipients )
Copies the selected setting to the share table for the given recipients.
Copies the selected setting to the share table for the given recipients.
Parameters
- $templateName
- Name of the template to copy,
- $recipients
- Array of user names.
Returns
boolean True if the copy was successful, false otherwise.
|
public
boolean
|
#
copyPublicSetting( hrm\setting\base\Setting $setting )
Creates a new Setting in the database and copies the values from a
public Setting.
Creates a new Setting in the database and copies the values from a
public Setting.
The new Setting will have the same name as the old Setting.
This is because this function is used to copy a preset (public
Setting) created by the admin into the user list of Setting's.
Parameters
- $setting
- An existing Setting.
Returns
boolean True if the copy was successful, false otherwise.
|
public
hrm\setting\base\Setting
|
#
loadSelectedSetting( )
Loads the values for the selected Setting and returns the Setting object.
Loads the values for the selected Setting and returns the Setting object.
Returns
|
public
boolean
|
#
makeSelectedSettingDefault( )
Make the selected Setting the default one.
Make the selected Setting the default one.
The selection will be stored in the database.
Returns
boolean True if it worked, false otherwise.
|
public
boolean
|
#
deleteSelectedSetting( )
Delete the Setting the selected Setting the default one.
Delete the Setting the selected Setting the default one.
The selection will be stored in the database.
Returns
boolean True if it worked, false otherwise.
|
public
string
|
#
message( )
Returns the error message that was set by last operation.
Returns the error message that was set by last operation.
The message string will be empty if the last operation was successful.
Returns
string Error message.
|
public
boolean
|
#
checkNewSettingName( string $name )
Checks that the given name for the new Setting is not empty and that and
there does not exist already a Setting with that name.
Checks that the given name for the new Setting is not empty and that and
there does not exist already a Setting with that name.
Parameters
- $name
- Name for the new Setting.
Returns
boolean True if the name is valid, false otherwise.
|
public
string
|
#
getValidNewSettingName( string $name )
Check if a Setting with given name exists. If it does not, return the
same name. Otherwise append numerical suffixes until a name that does not
exist is found. Return this modified name.
Check if a Setting with given name exists. If it does not, return the
same name. Otherwise append numerical suffixes until a name that does not
exist is found. Return this modified name.
Parameters
- $name
- Name of the Setting to try.
Returns
string Setting name with optional numeric suffix that does not yet exist in the system.
|
public
boolean
|
#
checkSelectedSetting( )
Checks whether a Setting is selected and whether the selection points to
an actually existing Setting.
Checks whether a Setting is selected and whether the selection points to
an actually existing Setting.
Returns
boolean True if an existing Setting is selected, false otherwise.
|