Stud.IP  jlu_3.3 Revision
StudipController Class Reference
Inheritance diagram for StudipController:
Inheritance graph
Collaboration diagram for StudipController:
Collaboration graph

Public Member Functions

 before_filter (&$action, &$args)
 
 perform ($unconsumed_path)
 
 after_filter ($action, $args)
 
 validate_args (&$args, $types=NULL)
 
 url_for ($to='')
 
 link_for ($to='')
 
 relocate ($to)
 
 rescue ($exception)
 
 setInfoBoxImage ($image)
 
 addToInfobox ($category, $text, $icon='blank.gif')
 
 render_json ($data)
 
 relay ($to_uri)
 
 perform_relayed ($unconsumed)
 
 render_template_as_string ($template, $layout=null)
 

Protected Member Functions

 populateInfobox ()
 

Protected Attributes

 $with_session = false
 
 $allow_nobody = true
 
 $encoding = "windows-1252"
 
 $utf8decode_xhr = false
 

Member Function Documentation

◆ addToInfobox()

addToInfobox (   $category,
  $text,
  $icon = 'blank.gif' 
)

Adds an item to a certain category section of the infobox. Categories are created in the order this method is invoked. Multiple occurences of a category will add items to the category.

Parameters
String$categoryThe item's category title used as the header above displayed category - write spoken not tech language ^^
String$textThe content of the item, may contain html
String$iconIcon to display in front the item, path is relative to :assets:/images
Since
Stud.IP 2.3
Deprecated:
since Stud.IP 3.1 in favor of the sidebar
Here is the call graph for this function:

◆ after_filter()

after_filter (   $action,
  $args 
)

Callback function being called after an action is executed.

Parameters
stringName of the action to perform.
arrayAn array of arguments to the action.
Returns
void

Reimplemented in Course_AdmissionController, Course_CancelDatesController, Course_ScmController, Document_DownloadController, FolderController, MessagesController, MyCoursesController, NewsController, Resources_HelpersController, and Settings_SettingsController.

Here is the call graph for this function:

◆ before_filter()

before_filter ( $action,
$args 
)

Reimplemented in Admin_AdditionalController, Admin_ApiController, Admin_AutoinsertController, Admin_BannerController, Admin_ConfigurationController, Admin_CoursesController, Admin_CourseWizardStepsController, Admin_Cronjobs_LogsController, Admin_Cronjobs_SchedulesController, Admin_Cronjobs_TasksController, Admin_DatafieldsController, Admin_DomainController, Admin_HolidaysController, Admin_LockrulesController, Admin_PluginController, Admin_RoleController, Admin_SemClassesController, Admin_SemesterController, Admin_SmileysController, Admin_SpecificationController, Admin_StatusgroupsController, Admin_StudycourseController, Admin_UserController, Admin_WebserviceAccessController, Admission_CoursesetController, Admission_RestrictedCoursesController, Admission_RuleController, Admission_RuleAdministrationController, Admission_UserListController, Api_AuthorizationsController, Api_OauthController, BbController, Calendar_CalendarController, Calendar_GroupController, Calendar_ScheduleController, Calendar_SingleController, ContactController, Course_AdmissionController, Course_AvatarController, Course_BlockAppointmentsController, Course_CancelDatesController, Course_ChangeViewController, Course_DatesController, Course_DetailsController, Course_ElearningController, Course_EnrolmentController, Course_LiteratureController, Course_ManagementController, Course_MembersController, Course_OverviewController, Course_RoomRequestsController, Course_ScmController, Course_StudyAreasController, Course_StudygroupController, Course_TopicsController, Course_WizardController, Document_AdministrationController, Document_ClosedController, DocumentController, Document_DownloadController, Document_FilesController, Document_FolderController, ElearningController, EventLogController, FolderController, HelpContentController, iCalController, Institute_AvatarController, Institute_BasicdataController, Institute_CalendarController, Institute_MembersController, Institute_OverviewController, JsupdaterController, LiteratureController, MessagesController, MyCoursesController, MyInstitutesController, MyStudygroupsController, NewsController, OnlineController, PluginController, ProfileController, ProfileModulesController, PublicCoursesController, Resources_HelpersController, ScoreController, Search_CoursesController, Settings_AccountController, Settings_AvatarController, Settings_CalendarController, Settings_CategoriesController, Settings_DeputiesController, Settings_DetailsController, Settings_GeneralController, Settings_MessagingController, Settings_NotificationController, Settings_PasswordController, Settings_PrivacyController, Settings_SettingsController, Settings_StatusgruppenController, Settings_StudiesController, Settings_UserdomainsController, SiteinfoController, SmileysController, StartController, StudygroupController, TourController, Userfilter_FieldController, Userfilter_FilterController, and WikiController.

Here is the call graph for this function:

◆ link_for()

link_for (   $to = '')

Returns an escaped URL to a specified route to your Trails application. without first parameter the current action is used if route begins with a / then the current controller ist prepended if second parameter is an array it is passed to URLHeper

Parameters
stringa string containing a controller and optionally an action
stringsoptional arguments
Returns
string a URL to this route
Here is the call graph for this function:
Here is the caller graph for this function:

◆ perform()

perform (   $unconsumed_path)

Hooked perform method in order to inject body element id creation.

In order to avoid clashes, these body element id will be joined with a minus sign. Otherwise the controller "x" with action "y_z" would be given the same id as the controller "x/y" with the action "z", namely "x_y_z". With the minus sign this will result in the ids "x-y_z" and "x_y-z".

Plugins will always have a leading 'plugin-' and the decamelized plugin name in front of the id.

Parameters
String$unconsumed_pathPath segment containing action and optionally arguments or format
Returns
Trails_Response from parent controller
Here is the call graph for this function:

◆ perform_relayed()

perform_relayed (   $unconsumed)

perform a given action/parameter string from an relayed request before_filter and after_filter methods are not called

See also
perform
Parameters
string$unconsumed
Returns
Trails_Response

◆ populateInfobox()

populateInfobox ( )
protected

Spawns a new infobox variable on this object, if neccessary.

Since
Stud.IP 2.3
Deprecated:
since Stud.IP 3.1 in favor of the sidebar

Reimplemented in Settings_SettingsController.

Here is the caller graph for this function:

◆ relay()

relay (   $to_uri)

relays current request to another controller and returns the response the other controller is given all assigned properties, additional parameters are passed through

Parameters
string$to_uria trails route
Returns
Trails_Response
Here is the caller graph for this function:

◆ relocate()

relocate (   $to)

Relocate the user to another location. This is a specialized version of redirect that differs in two points:

  • relocate() will force the browser to leave the current dialog while redirect would refresh the dialog's contents
  • relocate() accepts all the parameters that url_for() accepts so it's no longer neccessary to chain url_for() and redirect()
Parameters
String$toLocation to redirect to
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_json()

render_json (   $data)

render given data as json, data is converted to utf-8

Parameters
unknown$data

Reimplemented in Course_BlockAppointmentsController, and Course_RoomRequestsController.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_template_as_string()

render_template_as_string (   $template,
  $layout = null 
)

Renders a given template and returns the resulting string.

Parameters
string$templateName of the template file
mixed$layoutOptional layout
Returns
string
Here is the caller graph for this function:

◆ rescue()

rescue (   $exception)

Exception handler called when the performance of an action raises an exception.

Parameters
objectthe thrown exception

◆ setInfoBoxImage()

setInfoBoxImage (   $image)

Sets the header image for the infobox.

Parameters
String$imageImage to display, path is relative to :assets:/images
Since
Stud.IP 2.3
Deprecated:
since Stud.IP 3.1 in favor of the sidebar
Here is the call graph for this function:

◆ url_for()

url_for (   $to = '')

Returns a URL to a specified route to your Trails application. without first parameter the current action is used if route begins with a / then the current controller ist prepended if second parameter is an array it is passed to URLHeper

Parameters
stringa string containing a controller and optionally an action
stringsoptional arguments
Returns
string a URL to this route

Reimplemented in Settings_SettingsController.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_args()

validate_args ( $args,
  $types = NULL 
)

Validate arguments based on a list of given types. The types are: 'int', 'float', 'option' and 'string'. If the list of types is NULL or shorter than the argument list, 'option' is assumed for all remaining arguments. 'option' differs from Request::option() in that it also accepts the charaters '-' and ',' in addition to all word charaters.

Parameters
arrayan array of arguments to the action
arraylist of argument types (optional)
Here is the caller graph for this function:

Field Documentation

◆ $allow_nobody

$allow_nobody = true
protected

◆ $encoding

$encoding = "windows-1252"
protected

◆ $utf8decode_xhr

$utf8decode_xhr = false
protected

◆ $with_session

$with_session = false
protected

The documentation for this class was generated from the following file: