Methods summary
public
array
|
#
events( )
Declares events and the event handler methods.
Declares events and the event handler methods.
See yii documentation on behavior; this is an override of CBehavior::events()
Returns
array events (array keys) and the corresponding event handler methods (array values).
Overrides
CBehavior::events()
|
public
|
|
public
|
#
getJSGlobalsSetupScript( object $profile = null )
Returns a JS string which declares two global JS dictionaries if they haven't
already been declared. Additional properties of the yii global are declared if
the user has a profile. The globals would already have been decalared in the
case that this is an AJAX request in which registered scripts are being sent
back in response to the client.
Returns a JS string which declares two global JS dictionaries if they haven't
already been declared. Additional properties of the yii global are declared if
the user has a profile. The globals would already have been decalared in the
case that this is an AJAX request in which registered scripts are being sent
back in response to the client.
Parameters
- $profile
object if set, additional profile specific properties are declared
Returns
string A JS string
|
public
|
#
beginRequest( )
Load dynamic app configuration.
Load dynamic app configuration.
Per the onBeginRequest key in the array returned by ApplicationConfigBehavior::events() , this
method will be called when the request has begun. It allows for many extra
configuration tasks to be run on a per-request basis without having to extend
Yii and override its methods.
|
public
boolean
|
#
contEd( string $edition )
Returns true or false for whether or not the application's current edition
contains a given edition.
Returns true or false for whether or not the application's current edition
contains a given edition.
Parameters
- $edition
string $edition The edition. With "opensource", this function will always evaluate to
true.
Returns
boolean
|
public
|
|
public
|
#
createExternalUrl( string $route, array $params = array() )
Creates an URL that is safe to use for public-facing assets.
Creates an URL that is safe to use for public-facing assets.
In the case that there is no web request, but the "external" web root is
defined, the $_SERVER superglobal doesn't have necessary indexes like
"SERVER_PROTOCOL" to construct valid URLs. However, using the user-defined
external web root, it will explicitly use the route to generate the URL (and
assume the "path" format is always used for URLs).
The solution ("Offline URL generation" should really be replaced with
something more elegant in the future. It is a crude attempt to replicate URL
creation for offline-generated URLs, i.e. for a console command that sends
emails. It was deemed, at the time of this special case's writing, impractical
to override CUrlManager.createUrl due to the complexity and number of places
where the $_SERVER superglobal (which any solution would need to eliminate
dependency thereupon) is referenced / depended upon.
Provided the convention of always using absolute (and never relative) routes
is always adhered to, and the URL style remains "path", this kludge should
always work.
Parameters
- $route
string $route The module/controller/action route
- $params
array $params Query parameters
|
public
type
|
#
getAbsoluteBaseUrl( )
Magic getter for absoluteBaseUrl; in the case that web request data
isn't available, it uses a config file.
Magic getter for absoluteBaseUrl; in the case that web request data
isn't available, it uses a config file.
Returns
type
|
public
|
|
public
string
|
|
public
type
|
#
getEditionHierarchy( )
Returns the edition hierarchy defined in the static configuration.
Returns the edition hierarchy defined in the static configuration.
Returns
type
|
public
|
#
getEditions( )
Returns editions "contained" by the app's current edition
Returns editions "contained" by the app's current edition
|
public
|
#
getEditionLabel( mixed $addPrefix = false )
Returns the name of the software edition.
Returns the name of the software edition.
|
public
|
|
public
string
|
#
getFavIconUrl( )
Returns
string url of favicon image file for the current version
|
public
string
|
#
getLoginLogoUrl( )
Returns
string url of login logo image file for the current version
|
public
|
|
public
|
|
public
type
|
#
getExternalWebDomain( )
Resolves the public-facing absolute base url.
Resolves the public-facing absolute base url.
Returns
type
|
public
type
|
#
getIsUserGuest( )
"isGuest" wrapper that can be used from CLI
"isGuest" wrapper that can be used from CLI
Used in biz rules for RBAC items in place of Yii::app()->user->isGuest
for the reason that Yii::app()->user is meaningless at the command line
Returns
type
|
public
type
|
#
getSuID( )
Substitute user ID magic getter.
Substitute user ID magic getter.
If the user has already been looked up or set, method will defer to its value
for id. Defers to the value of id in suModel.
Returns
type
|
public
type
|
#
getIsInSession( )
Shortcut method for ascertaining if a user session is available
Shortcut method for ascertaining if a user session is available
Returns
type
|
public
boolean
|
#
getLocked( )
Returns the lock status of the application.
Returns the lock status of the application.
Returns
boolean
|
public
type
|
#
getLockFile( )
Returns the path to the application lock file
Returns the path to the application lock file
Returns
type
|
public
|
#
setLocked( type $value )
Lock the application (non-administrative users cannot use it).
Lock the application (non-administrative users cannot use it).
If the value evaluates to false, the application will be unlocked.
Parameters
|
public
User
|
#
getSuModel( )
Substitute user model magic getter.
Substitute user model magic getter.
Returns
|
public
|
#
getSuName( )
Substitute user name getter.
Substitute user name getter.
This is intended to be safer than suModel->userName insofar as it defaults
to "Guest" if no name/session has yet been established. It is expected that in
console commands, API requests and unit testing, the suModel property be
set as desired, so that this does not evaluate to "Guest"
|
public
|
#
setSuModel( User $user )
Magic setter for substitute user model
Magic setter for substitute user model
Parameters
|
public
|
#
importDirectories( )
Import all directories that are used system-wide.
Import all directories that are used system-wide.
|
public
|
|
Methods inherited from CComponent
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
Magic properties summary
public
string
|
$absoluteBaseUrl
|
#
(read-only) the base URL of the web application, independent of whether there
is a web request.
(read-only) the base URL of the web application, independent of whether there
is a web request.
|
public
string
|
$edition
|
#
The "edition" of the software.
The "edition" of the software.
|
public
array
|
$editionHierarchy
|
#
Information about software sets as defined in the static configuration file
protected/data/editionHierarchy.php
Information about software sets as defined in the static configuration file
protected/data/editionHierarchy.php
|
public
array
|
$editions
|
#
(read-only) The editions that apply to the app.
(read-only) The editions that apply to the app.
|
public
string
|
$externalAbsoluteBaseUrl
|
#
(read-only) the absolute base url of the application to use when creating
URLs to be viewed publicly
(read-only) the absolute base url of the application to use when creating
URLs to be viewed publicly
|
public
string
|
$externalWebRoot
|
#
(read-only) The absolute base webroot URL of the application to use when
creating URLs to be viewed publicly, from the internet (i.e. the web lead
capture form, email tracking links, etc.)
(read-only) The absolute base webroot URL of the application to use when
creating URLs to be viewed publicly, from the internet (i.e. the web lead
capture form, email tracking links, etc.)
|
public
integer|boolean
|
$locked
|
#
Integer (timestamp) if the application is locked; false otherwise.
Integer (timestamp) if the application is locked; false otherwise.
|
public
string
|
$lockFile
|
|
public
Admin
|
$settings
|
#
The admin model containing settings for the app.
The admin model containing settings for the app.
|
public
integer
|
$suID
|
#
(read-only) substitute user ID in the case that no user session is
available.
(read-only) substitute user ID in the case that no user session is
available.
|
public
User
|
$suModel
|
#
Substitute web user model in the case that no user session is available.
Substitute web user model in the case that no user session is available.
|