Stud.IP  5.4
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()

__construct (   $name)

contsructs a new MultiPersonSearch object.

Parameters
stringname of the object and html ids

Member Function Documentation

◆ addQuickfilter()

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()

clearQuickfilters ( )

clears all quickfilters.

Returns
MultiPersonSearch

◆ clearSession()

clearSession ( )

clears the session data.

◆ get()

static get (   $name)
static

returns a MultiPersonSearch object.

Parameters
stringname of the object
Returns
MultiPersonSearch

◆ getAddedUsers()

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()

getAdditionalOptionArray ( )

returns an additional option array.

Returns
string html code

◆ getAdditionHTML()

getAdditionHTML ( )

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

Returns
string html code

◆ getDataDialogStatus()

getDataDialogStatus ( )

returns if data-dialog is enabled or disabled

Returns
bool

◆ getDefaultSelectableUsersIDs()

getDefaultSelectableUsersIDs ( )

returns the ids of defaultselectable users.

Returns
array

◆ getDefaultSelectedUsersIDs()

getDefaultSelectedUsersIDs ( )

returns the ids of defaultselected users.

Returns
array

◆ getDescription()

getDescription ( )

returns the description.

Returns
string

◆ getExecuteURL()

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()

getJSFunctionOnSubmit ( )

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

Returns
string function name

◆ getLinkIconPath()

getLinkIconPath ( )

returns the icon of the link to open the dialog.

Returns
string path ot the icon.

◆ getLinkText()

getLinkText ( )

returns the link text of the link.

Returns
string text of the link.

◆ getNavigationItem()

getNavigationItem ( )

returns the navigation item.

Returns
string

◆ getPageUrl()

getPageUrl ( )

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

Returns
string

◆ getQuickfilterIds()

getQuickfilterIds ( )

returns the ids of quickfilters.

Returns
array

◆ getRemovedUsers()

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()

getSearchObject ( )

returns the search object.

Returns
SearchType

◆ getTitle()

getTitle ( )

returns the title.

Returns
string

◆ load()

static load (   $name)
static

restores a MultiPersonSearch object.

Parameters
stringname of the object
Returns
MultiPersonSearch

◆ render()

render (   $with_link_text = true)

renders a link to open the multipersonsearch dialog.

Parameters
string$with_link_textinclude link text in output

◆ restoreFromSession()

restoreFromSession ( )

restores the internal data from a session.

◆ saveAddedUsersToSession()

saveAddedUsersToSession ( )

saves the added persons to $_SESSION.

◆ saveRemovedUsersToSession()

saveRemovedUsersToSession ( )

saves the removed persons to $_SESSION.

◆ setAdditionalHTML()

setAdditionalHTML (   $html)

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

Parameters
stringhtml code
Returns
MultiPersonSearch

◆ setDataDialogStatus()

setDataDialogStatus (   $status)

enables or disabled data-dialog

Parameters
boolean$status
Returns
$this

◆ setDefaultSelectableUser()

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()

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()

setDescription (   $desc)

sets the description of the dialog.

Parameters
string$descdescription of the dialog
Returns
MultiPersonSearch

◆ setExecuteURL()

setExecuteURL (   $action)

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

Parameters
stringaction
Returns
MultiPersonSearch

◆ setJSFunctionOnSubmit()

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()

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()

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()

setNavigationItem (   $navigationItem)

sets the navigation item.

Parameters
string$navigationItemnavigation item
Returns
MultiPersonSearch

◆ setSearchObject()

setSearchObject (   $searchType)

sets the search object.

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

◆ setTitle()

setTitle (   $title)

sets the title of the dialog.

Parameters
string$titletitle of the dialog
Returns
MultiPersonSearch

◆ storeToSession()

storeToSession ( )

stores the internal data to a session.


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