ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\SurveyQuestionPool\Editing\EditSessionRepository Class Reference

Stores session data in import process. More...

+ Collaboration diagram for ILIAS\SurveyQuestionPool\Editing\EditSessionRepository:

Public Member Functions

 __construct ()
 
 addQuestionToClipboard (int $qid, string $action)
 
 getQuestionsFromClipboard ()
 
 clearClipboardQuestions ()
 
 setSearchLinkType (string $type)
 
 getSearchLinkType ()
 
 clearSearchLinkType ()
 
 setNewLinkType (string $type)
 
 getNewLinkType ()
 
 clearNewLinkType ()
 

Data Fields

const KEY_BASE = "svy_edit_"
 
const KEY_QCLIP = self::KEY_BASE . "qclip"
 
const KEY_SLTYPE = self::KEY_BASE . "search_link_type"
 
const KEY_NLTYPE = self::KEY_BASE . "new_link_type"
 

Detailed Description

Stores session data in import process.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 28 of file class.EditSessionRepository.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::__construct ( )

Definition at line 35 of file class.EditSessionRepository.php.

36  {
37  }

Member Function Documentation

◆ addQuestionToClipboard()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::addQuestionToClipboard ( int  $qid,
string  $action 
)

Definition at line 39 of file class.EditSessionRepository.php.

References ilSession\get(), ilSession\has(), and ilSession\set().

39  : void
40  {
41  $entries = [];
42  if (\ilSession::has(self::KEY_QCLIP)) {
43  $entries = \ilSession::get(self::KEY_QCLIP);
44  }
45  $entries[$qid] = [
46  "question_id" => $qid,
47  "action" => $action
48  ];
49  \ilSession::set(self::KEY_QCLIP, $entries);
50  }
static get(string $a_var)
static has($a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ clearClipboardQuestions()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::clearClipboardQuestions ( )

Definition at line 61 of file class.EditSessionRepository.php.

References ilSession\clear(), and ilSession\has().

61  : void
62  {
63  if (\ilSession::has(self::KEY_QCLIP)) {
64  \ilSession::clear(self::KEY_QCLIP);
65  }
66  }
static has($a_var)
static clear(string $a_var)
+ Here is the call graph for this function:

◆ clearNewLinkType()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::clearNewLinkType ( )

Definition at line 95 of file class.EditSessionRepository.php.

References ilSession\clear(), and ilSession\has().

95  : void
96  {
97  if (\ilSession::has(self::KEY_NLTYPE)) {
98  \ilSession::clear(self::KEY_NLTYPE);
99  }
100  }
static has($a_var)
static clear(string $a_var)
+ Here is the call graph for this function:

◆ clearSearchLinkType()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::clearSearchLinkType ( )

Definition at line 78 of file class.EditSessionRepository.php.

References ilSession\clear(), and ilSession\has().

78  : void
79  {
80  if (\ilSession::has(self::KEY_SLTYPE)) {
81  \ilSession::clear(self::KEY_SLTYPE);
82  }
83  }
static has($a_var)
static clear(string $a_var)
+ Here is the call graph for this function:

◆ getNewLinkType()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::getNewLinkType ( )

Definition at line 90 of file class.EditSessionRepository.php.

References ilSession\get().

90  : string
91  {
92  return (string) \ilSession::get(self::KEY_NLTYPE);
93  }
static get(string $a_var)
+ Here is the call graph for this function:

◆ getQuestionsFromClipboard()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::getQuestionsFromClipboard ( )

Definition at line 52 of file class.EditSessionRepository.php.

References ilSession\get(), and ilSession\has().

52  : array
53  {
54  $entries = [];
55  if (\ilSession::has(self::KEY_QCLIP)) {
56  $entries = \ilSession::get(self::KEY_QCLIP);
57  }
58  return $entries;
59  }
static get(string $a_var)
static has($a_var)
+ Here is the call graph for this function:

◆ getSearchLinkType()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::getSearchLinkType ( )

Definition at line 73 of file class.EditSessionRepository.php.

References ilSession\get().

73  : string
74  {
75  return (string) \ilSession::get(self::KEY_SLTYPE);
76  }
static get(string $a_var)
+ Here is the call graph for this function:

◆ setNewLinkType()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::setNewLinkType ( string  $type)

Definition at line 85 of file class.EditSessionRepository.php.

References ilSession\set().

85  : void
86  {
87  \ilSession::set(self::KEY_NLTYPE, $type);
88  }
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ setSearchLinkType()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::setSearchLinkType ( string  $type)

Definition at line 68 of file class.EditSessionRepository.php.

References ilSession\set().

68  : void
69  {
70  \ilSession::set(self::KEY_SLTYPE, $type);
71  }
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

Field Documentation

◆ KEY_BASE

const ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::KEY_BASE = "svy_edit_"

Definition at line 30 of file class.EditSessionRepository.php.

◆ KEY_NLTYPE

const ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::KEY_NLTYPE = self::KEY_BASE . "new_link_type"

Definition at line 33 of file class.EditSessionRepository.php.

◆ KEY_QCLIP

const ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::KEY_QCLIP = self::KEY_BASE . "qclip"

Definition at line 31 of file class.EditSessionRepository.php.

◆ KEY_SLTYPE

const ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::KEY_SLTYPE = self::KEY_BASE . "search_link_type"

Definition at line 32 of file class.EditSessionRepository.php.


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