SsoProfil class. A Profil is a container for Theme class

package sso\lib\dao

 Methods

Remove theme preview

clearPreview() 
Static

Create a new profile

createNew(integer $appliId, string $appliName, string $user) : \sso\SsoProfil
Static

Parameters

$appliId

integer

application ID. If NULL, use default theme, recommended theme otherwise

$appliName

string

application name

$user

string

User ID

Returns

\sso\SsoProfilthe new profile

Retrieve current profil to use

getCurrent(\sso\SsoClient $sso, string $application = NULL) : \sso\SsoProfil
Static

Parameters

$sso

\sso\SsoClient

SSO instance

$application

string

application, for check again

Returns

\sso\SsoProfilprofil to use

Retrieve internal profil for internal theme

getInternalProfile(\sso\SsoClient $sso, integer $appli, string $theme) : NULL | \sso\SsoProfil
Static

Parameters

$sso

\sso\SsoClient

SSO instance

$appli

integer

Application ID

$theme

string

theme name

Returns

NULL\sso\SsoProfilreturn NULL if theme is not an internal theme

Retrieve Theme object

getThemeObject() : \sso\Theme

Returns

\sso\Theme

Retrieve all themes in "themes" directory

getThemesList() : array<mixed,string>
Static

Returns

array<mixed,string>themes as themeName => themeName

Initialize profiles

initProfiles(\sso\Sso $sso) 
Static

set SSO_PROFIL key in session

Parameters

$sso

\sso\Sso

SSO instance

Check a theme is internal

isInternalTheme(string $theme) : boolean
Static

Parameters

$theme

string

theme name

Returns

booleanTRUE if internal, FALSE otherwise

Check is theme preview

isPreview() : TRUE
Static

Returns

TRUEif we set preview, FALSE otherwise

Check a theme is valid

isThemeValid(string $theme, integer $appliId) : boolean
Static

Parameters

$theme

string

theme name

$appliId

integer

application ID

Returns

booleanTRUE if theme exists, or recommended (with appliId not null)

Set theme preview

setPreview(\sso\SsoProfil $profil) 
Static

Parameters

$profil

\sso\SsoProfil

The profile to preview

Set the Theme object

setThemeObject(\sso\Theme $theme) 

Parameters

$theme

\sso\Theme

 Properties

 

$appliId

$appliId : integer

Default

magic
property
 

$enabled

$enabled : boolean

Default

magic
property
 

$id

$id : integer

Default

magic
property
 

$options

$options : string

Default

magic
property
 

Application path

$path : string

Default

NULL
 

$theme

$theme : string

Default

magic
property
 

$userId

$userId : string

Default

magic
property
 

list of internal profiles

$internalProfiles : array<mixed,string>

Default

array(self::RECOMMENDED_PROFILE)
Static

 Constants

 

default theme ID

DEFAULT_THEME = 'menu' 
 

menu.css.php key for preview theme, also used as application path for preview

PREVIEW_KEY = 'SSO_PREVIEW'