Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
MVVController Class Reference
Inheritance diagram for MVVController:
AuthenticatedController StudipController Fachabschluss_AbschluesseController Fachabschluss_FaecherController Fachabschluss_KategorienController Lvgruppen_LvgruppenController Materialien_FilesController Module_DownloadController Module_ModuleController Search_AngebotController Search_ModuleController Search_StudiengaengeController Seminar_DetailsController Shared_ContactsController Shared_LogEventController SharedVersionController Studiengaenge_InformationenController Studiengaenge_StgteilbezeichnungenController Studiengaenge_StudiengaengeController

Public Member Functions

 before_filter (&$action, &$args)
 
 paramSuffix ($action= '')
 
 renderSortLink ($action, $text, $field, $attributes=null)
 
 jsUrl ($to= '', $params=[])
 
 qs_result_action ()
 
- Public Member Functions inherited from StudipController
 before_filter (&$action, &$args)
 
 erase_response ()
 
 perform ($unconsumed_path)
 
 after_filter ($action, $args)
 
 validate_args (&$args, $types=null)
 
 url_for ($to= '')
 
 link_for ($to= '')
 
 redirect ($to)
 
 relocate ($to)
 
 rescue ($exception)
 
 render_json ($data)
 
 render_csv ($data, $filename=null, $delimiter= ';', $enclosure= '"')
 
 render_file ($file, $filename=null, $content_type=null, $content_disposition= 'attachment', Closure $callback=null, $chunk_size=262144)
 
 render_temporary_file ($file, $filename=null, $content_type=null, $content_disposition= 'attachment', Closure $callback=null, $chunk_size=262144)
 
 relay ($to_uri)
 
 relayWithRedirect (...$args)
 
 perform_relayed ($unconsumed)
 
 render_template_as_string ($template, $layout=null)
 
 __call ($method, $arguments)
 
 has_action ($action)
 
 action_url ($action)
 
 action_link ($action)
 
 validate_datetime ($datetime, $format= 'H:i')
 

Static Public Member Functions

static trim ($text)
 

Data Fields

 $search_result = []
 
 $search_term = ''
 
 $search_id = null
 
 $param_suffix = ''
 

Static Public Attributes

static $items_per_page
 

Protected Member Functions

 initSearchParams ($action= '')
 
 initPageParams ($action=null)
 
 setSidebar ()
 
 do_search ($class_name, $search_term=null, $search_id=null, $filter=null)
 
 getSearchResult ($class_name)
 
 reset_search ($action= '')
 
 reset_page ($action= '')
 
 sessSet ($key, $value)
 
 sessGet ($key, $default=null)
 
 sessRemove ($keys)
 
 sessDelete ()
 
- Protected Member Functions inherited from StudipController
 render_pdf (TCPDF $pdf, $filename, $inline=false)
 
 controller_path ()
 
 getBodyElementIdForControllerAndAction ($unconsumed_path)
 

Static Protected Member Functions

static IsVisible ()
 

Protected Attributes

 $sidebar_rendered = false
 
 $session_key
 
- Protected Attributes inherited from AuthenticatedController
 $with_session = true
 
 $allow_nobody = false
 
- Protected Attributes inherited from StudipController
 $with_session = false
 
 $allow_nobody = true
 
 $_autobind = false
 

Detailed Description

Author
Peter Thienel thien.nosp@m.el@d.nosp@m.ata-q.nosp@m.uest.nosp@m..de GPL2 or any later version
Since
3.5

Member Function Documentation

before_filter ( $action,
$args 
)
do_search (   $class_name,
  $search_term = null,
  $search_id = null,
  $filter = null 
)
protected

Perform the search for mvv objects of type defined by $class_name. Uses the findBySearchTerm method with its parameters $search_term and $filter. If $search_id is given, only this item will be found. Sets info messages with number of hits to page layout.

See Also
ModuleManagementModel::findBySearchTerm()
Parameters
string$class_nameThe name of an mvv object class.
string$search_termThe search term.
string$search_idThe id of an mvv object selected in quicksearch.
array$filterAn array with filter options feeded to search function to restrict search result.
getSearchResult (   $class_name)
protected

Returns the current search result of the given class. The search result is an array of object ids.

Parameters
stringThe class name of the found objects.
Returns
array Array of search results.
initPageParams (   $action = null)
protected

Initialzes the controller (considers name of action if given) based parameters for page navigation and bind them to url.

Parameters
string$actionThe name of the action (optional).
initSearchParams (   $action = '')
protected

Initialzes the controller (considers name of action if given) based parameters for search and bind them to url.

Parameters
string$actionThe name of the action (optional).
static IsVisible ( )
staticprotected

Determines the visibility of this controller.

Returns
bool True if the controller is visible.
jsUrl (   $to = '',
  $params = [] 
)

Renders a html snippet containing an url. This url is used by java script.

Parameters
string$toA string containing a controller and optionally an action. Default is the current controller.
array$paramsAn array with url parameters.
Returns
string The html used in templates
paramSuffix (   $action = '')

Returns a controller based (considers name of action if given) suffix for url parameters.

Parameters
string$actionThe name of the action (optional).
Returns
string Suffix for parameters.
qs_result_action ( )

This action is used to show a select box instead of an input field if the user has clicked on the magnifier icon of a quicksearch.

Exceptions
Trails_Exception
renderSortLink (   $action,
  $text,
  $field,
  $attributes = null 
)

Renders a html snippet with a sort link used in table headers.

Parameters
string$actionThe action called by this link.
string$textThe text of the link.
string$fieldThe sort to sort by.
array$attributesAdditional url attributes.
Returns
string The html snippet.
reset_page (   $action = '')
protected

Resets the main page parameters for pagination and sorting for the given action.

Parameters
string$actionThe name of the action that uses the pagination and sorting.
reset_search (   $action = '')
protected

Deletes the search results stored in $this->search_result for the given action.

Parameters
string$actionThe name of the action that uses the particular search.
sessDelete ( )
protected

Deletes all values from the session used in this controller.

sessGet (   $key,
  $default = null 
)
protected

Returns the value of the given key from the session.

Parameters
string$keyThe key of the value to return.
Returns
mixed The value from session with the given key.
sessRemove (   $keys)
protected

Removes the value with the given key from the session.

Parameters
string | array$keysThe key of the value to remove from session.
sessSet (   $key,
  $value 
)
protected

Stores a value with the given key in the session.

Parameters
string$keyThe key of the value.
mixed$valueThe value to store under the given key.
Returns
the stored value
setSidebar ( )
protected

Sets the sidebar with all widgets and set value of sidebar_rendered to true.

static trim (   $text)
static

This weird WYSIWIG-Editor stores an empty string as an empty diff-element. Use this function to check whether the field has no content (no input by the user).

Parameters
string$textThe text from db to check.
Returns
string An empty string, if the content is an empty diff or an empty string

Field Documentation

$items_per_page
static
$param_suffix = ''
$search_id = null
$search_result = []
$search_term = ''
$session_key
protected
$sidebar_rendered = false
protected

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