Stud.IP  5.4
 All Data Structures Namespaces Files Functions Variables Groups
MultiPersonSearch Class Reference

Public Member Functions

 __construct ($name)
 
 getAddedUsers ()
 
 saveAddedUsersToSession ()
 
 getRemovedUsers ()
 
 saveRemovedUsersToSession ()
 
 render ($with_link_text=true)
 
 setLinkIconPath ($path)
 
 getLinkIconPath ()
 
 setLinkText ($text="")
 
 getLinkText ()
 
 setExecuteURL ($action)
 
 getExecuteURL ()
 
 setJSFunctionOnSubmit ($function_name)
 
 getJSFunctionOnSubmit ()
 
 setSearchObject ($searchType)
 
 getSearchObject ()
 
 setAdditionalHTML ($html)
 
 setDataDialogStatus ($status)
 
 getDataDialogStatus ()
 
 getAdditionHTML ()
 
 getAdditionalOptionArray ()
 
 setDefaultSelectableUser ($userArray)
 
 getDefaultSelectableUsersIDs ()
 
 setDefaultSelectedUser ($userArray)
 
 getDefaultSelectedUsersIDs ()
 
 setTitle ($title)
 
 getTitle ()
 
 setDescription ($desc)
 
 getDescription ()
 
 getPageUrl ()
 
 addQuickfilter ($title, $userArray)
 
 getQuickfilterIds ()
 
 clearQuickfilters ()
 
 setNavigationItem ($navigationItem)
 
 getNavigationItem ()
 
 storeToSession ()
 
 restoreFromSession ()
 
 clearSession ()
 

Static Public Member Functions

static load ($name)
 
static get ($name)
 

Constructor & Destructor Documentation

__construct (   $name)

contsructs a new MultiPersonSearch object.

Parameters
stringname of the object and html ids

Member Function Documentation

addQuickfilter (   $title,
  $userArray 
)

adds a new quickfilter.

Parameters
string$titletitle of the new quickfilter
array$userArraycontaining all user-ids belonging to the quickfilter
Returns
MultiPersonSearch
clearQuickfilters ( )

clears all quickfilters.

Returns
MultiPersonSearch
clearSession ( )

clears the session data.

static get (   $name)
static

returns a MultiPersonSearch object.

Parameters
stringname of the object
Returns
MultiPersonSearch
getAddedUsers ( )

returns the newly added persons. The array will contain all persons which are selected (on the right side of the dialog) but without the defaultSelectedUsers.

Returns
array containing all new persons
getAdditionalOptionArray ( )

returns an additional option array.

Returns
string html code
getAdditionHTML ( )

returns html code which will be shown inside the form element.

Returns
string html code
getDataDialogStatus ( )

returns if data-dialog is enabled or disabled

Returns
bool
getDefaultSelectableUsersIDs ( )

returns the ids of defaultselectable users.

Returns
array
getDefaultSelectedUsersIDs ( )

returns the ids of defaultselected users.

Returns
array
getDescription ( )

returns the description.

Returns
string
getExecuteURL ( )

returns the action which will handle the added and removed persons after saving the dialog.

Returns
string action which will handle the form data.
getJSFunctionOnSubmit ( )

returns a JavaScript-function which should be fired when the user has pressed the submit button.

Returns
string function name
getLinkIconPath ( )

returns the icon of the link to open the dialog.

Returns
string path ot the icon.
getLinkText ( )

returns the link text of the link.

Returns
string text of the link.
getNavigationItem ( )

returns the navigation item.

Returns
string
getPageUrl ( )

returns the url of the page where the GUI element is added.

Returns
string
getQuickfilterIds ( )

returns the ids of quickfilters.

Returns
array
getRemovedUsers ( )

returns the removed persons. The array will contain all persons which were selected by default (on the right side of the dialog) and then removed by the user.

Returns
array containing all removed persons
getSearchObject ( )

returns the search object.

Returns
SearchType
getTitle ( )

returns the title.

Returns
string
static load (   $name)
static

restores a MultiPersonSearch object.

Parameters
stringname of the object
Returns
MultiPersonSearch
render (   $with_link_text = true)

renders a link to open the multipersonsearch dialog.

Parameters
string$with_link_textinclude link text in output
restoreFromSession ( )

restores the internal data from a session.

saveAddedUsersToSession ( )

saves the added persons to $_SESSION.

saveRemovedUsersToSession ( )

saves the removed persons to $_SESSION.

setAdditionalHTML (   $html)

sets html code which will be shown inside the form element.

Parameters
stringhtml code
Returns
MultiPersonSearch
setDataDialogStatus (   $status)

enables or disabled data-dialog

Parameters
boolean$status
Returns
$this
setDefaultSelectableUser (   $userArray)

sets the persons which will be shown as selectable by default on the left side of the dialoag.

Parameters
arrayarray containing user-ids
setDefaultSelectedUser (   $userArray)

sets the persons which will be shown as selected by default on the right side of the dialoag.

Parameters
arrayarray containing user-ids
setDescription (   $desc)

sets the description of the dialog.

Parameters
string$descdescription of the dialog
Returns
MultiPersonSearch
setExecuteURL (   $action)

sets the action which will handle the added and removed persons after saving the dialog.

Parameters
stringaction
Returns
MultiPersonSearch
setJSFunctionOnSubmit (   $function_name)

sets a JavaScript-function to be fired when the user has pressed the submit-button. Arguments are: function fireme(id_of_item, text_of_item) example setting: MPS->setJSFunctionOnSubmit('fireme');

Parameters
string$function_namethe name of the javascript function
Returns
MultiPersonSearch
setLinkIconPath (   $path)

sets the icon of the link to open the dialog. To hide the icon an empty string can be set.

Parameters
stringpath ot the icon
Returns
MultiPersonSearch
setLinkText (   $text = "")

sets the link text of the link to open the dialog. To hide the text an empty string can be set.

Parameters
stringtext of the link
Returns
MultiPersonSearch
setNavigationItem (   $navigationItem)

sets the navigation item.

Parameters
string$navigationItemnavigation item
Returns
MultiPersonSearch
setSearchObject (   $searchType)

sets the search object.

Parameters
SearchTypeobject of type SearchType (e.g. SQLSearch.class.php)
Returns
MultiPersonSearch
setTitle (   $title)

sets the title of the dialog.

Parameters
string$titletitle of the dialog
Returns
MultiPersonSearch
storeToSession ( )

stores the internal data to a session.


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