ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables 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 ()
 
 setPhraseData (array $data)
 
 getPhraseData ()
 

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"
 
const KEY_PHRASE_DATA = self::KEY_BASE . "phr_data"
 

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 36 of file class.EditSessionRepository.php.

37  {
38  }

Member Function Documentation

◆ addQuestionToClipboard()

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

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

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

40  : void
41  {
42  $entries = [];
43  if (\ilSession::has(self::KEY_QCLIP)) {
44  $entries = \ilSession::get(self::KEY_QCLIP);
45  }
46  $entries[$qid] = [
47  "question_id" => $qid,
48  "action" => $action
49  ];
50  \ilSession::set(self::KEY_QCLIP, $entries);
51  }
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 62 of file class.EditSessionRepository.php.

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

62  : void
63  {
64  if (\ilSession::has(self::KEY_QCLIP)) {
65  \ilSession::clear(self::KEY_QCLIP);
66  }
67  }
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 96 of file class.EditSessionRepository.php.

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

96  : void
97  {
98  if (\ilSession::has(self::KEY_NLTYPE)) {
99  \ilSession::clear(self::KEY_NLTYPE);
100  }
101  }
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 79 of file class.EditSessionRepository.php.

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

79  : void
80  {
81  if (\ilSession::has(self::KEY_SLTYPE)) {
82  \ilSession::clear(self::KEY_SLTYPE);
83  }
84  }
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 91 of file class.EditSessionRepository.php.

References ilSession\get().

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

◆ getPhraseData()

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

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

References ilSession\get().

108  : array
109  {
110  return (\ilSession::get(self::KEY_PHRASE_DATA) ?? []);
111  }
static get(string $a_var)
+ Here is the call graph for this function:

◆ getQuestionsFromClipboard()

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

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

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

53  : array
54  {
55  $entries = [];
56  if (\ilSession::has(self::KEY_QCLIP)) {
57  $entries = \ilSession::get(self::KEY_QCLIP);
58  }
59  return $entries;
60  }
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 74 of file class.EditSessionRepository.php.

References ilSession\get().

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

◆ setNewLinkType()

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

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

References ilSession\set().

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

◆ setPhraseData()

ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::setPhraseData ( array  $data)

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

References ilSession\set().

103  : void
104  {
105  \ilSession::set(self::KEY_PHRASE_DATA, $data);
106  }
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 69 of file class.EditSessionRepository.php.

References ilSession\set().

69  : void
70  {
71  \ilSession::set(self::KEY_SLTYPE, $type);
72  }
$type
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_PHRASE_DATA

const ILIAS\SurveyQuestionPool\Editing\EditSessionRepository::KEY_PHRASE_DATA = self::KEY_BASE . "phr_data"

Definition at line 34 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: