Implements global config
package | Default |
---|
__construct(array $aApplicationConfig = null)
access | public |
---|---|
array
beforeControllerAction(\CController $controller,\CAction $action): boolean
This method is invoked before the currently requested controller action and all its filters are executed. You may override this method with logic that needs to be done before all controller actions.
\CController
the controller
\CAction
the action
boolean
whether the action should be executed.
createController( $route, $owner = null)
inheritdoc | Special handling for SEO friendly URLs |
---|---|
createControllerFromShortUrl(string $route): \array<mixed>|null
string
the route of the request.
\array|null
getApi()
getConfig(string $name,boolean|mixed $default = false): string
access | public |
---|
string
boolean|mixed
Value to return when not found, default is false
string
getPlugin(): object
object
getTwigCustomExtensionsConfig( $sUsertwigextensionrootdir, $aApplicationConfig)
var | $baseConfig['usertwigextensionrootdir'] the application configuration |
---|---|
handleFriendlyException(\LSUserException $exception): void
If the exception doesn't specify a redirect URL, the referrer is used.
\LSUserException
handleSpecificExceptions(\CException $exception): void
\CException
init()
initLanguage()
is_file( $filePath, $baseDir = null, $throwException = null): boolean
var | complete file path the directory where it must be, default to upload dir if security issue Throw Exception |
---|---|
boolean
loadConfig(string $file): void
access | public |
---|
string
loadHelper(string $helper): void
access | public |
---|
string
loadLibrary(string $library): void
access | public |
---|
string
Libraby name
onException(\CExceptionEvent $event): void
see | http://www.yiiframework.com/doc/api/1.1/CApplication#onException-detail Set surveys/error for 404 error |
---|
\CExceptionEvent
outputJsonError(\CHttpException $exception): void
\CHttpException
setConfig(string $name,mixed $value): void
access | public |
---|
string
mixed
setConfigs(): void
setFlashMessage(string $message,string $type = 'success'): \LSYii_Application
A flahs message will be shown on the next request and can contain a message
to tell that the action was successful or not. The message is displayed and
cleared when it is shown in the view using the widget:
$this->widget('application.extensions.FlashMessage.FlashMessage');
string
The message you want to show on next page load
string
Type can be 'success','info','warning','danger','error' which relate to the particular bootstrap alert classes - see http://getbootstrap.com/components/#alerts . Note: Option 'error' is synonymous to 'danger'
\LSYii_Application
Provides a fluent interface
setLanguage(string $sLanguage): void
access | public |
---|
string
setPlugin( $plugin): void
Corresponds to Yii::app()->getController()
setSessionByDB( $aApplicationConfig): void
config :
api :\LimeSurvey\PluginManager\LimesurveyApi
plugin :\LimeSurvey\PluginManager\iPlugin
dbVersion :integer|null
var |
---|
integer|null
log :\CLogRouter
Log router component.
\CLogRouter
language :string
Returns the language that the user is using and the application should be targeted to.
string
clientScript :\CClientScript
CClientScript manages JavaScript and CSS stylesheets for views.
\CClientScript
request :\CHttpRequest
The request component.
\CHttpRequest
db :\CDbConnection
The database connection.
\CDbConnection
baseUrl :string
The relative URL for the application.
string
user :\CWebUser
The user session information.
\CWebUser
twigRenderer :\LSETwigViewRenderer
Twig rendering plugin
\LSETwigViewRenderer
pluginManager :\PluginManager
The LimeSurvey Plugin manager
\PluginManager
bootstrap :\TbApi
The bootstrap renderer
\TbApi
session :\CHttpSession
The HTTP session
\CHttpSession