ILIAS  release_8 Revision v8.24
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.

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 set(string $a_var, $a_val)
Set a value.
static has($a_var)

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

+ Here is the call graph for this function:

◆ clearClipboardQuestions()

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

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

62 : void
63 {
64 if (\ilSession::has(self::KEY_QCLIP)) {
65 \ilSession::clear(self::KEY_QCLIP);
66 }
67 }
static clear(string $a_var)

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

+ Here is the call graph for this function:

◆ clearNewLinkType()

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

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

96 : void
97 {
98 if (\ilSession::has(self::KEY_NLTYPE)) {
99 \ilSession::clear(self::KEY_NLTYPE);
100 }
101 }

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

+ Here is the call graph for this function:

◆ clearSearchLinkType()

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

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

79 : void
80 {
81 if (\ilSession::has(self::KEY_SLTYPE)) {
82 \ilSession::clear(self::KEY_SLTYPE);
83 }
84 }

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

+ Here is the call graph for this function:

◆ getNewLinkType()

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

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

91 : string
92 {
93 return (string) \ilSession::get(self::KEY_NLTYPE);
94 }

References ilSession\get().

+ Here is the call graph for this function:

◆ getPhraseData()

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

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

108 : array
109 {
110 return (\ilSession::get(self::KEY_PHRASE_DATA) ?? []);
111 }

References ilSession\get().

+ Here is the call graph for this function:

◆ getQuestionsFromClipboard()

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

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

53 : array
54 {
55 $entries = [];
56 if (\ilSession::has(self::KEY_QCLIP)) {
57 $entries = \ilSession::get(self::KEY_QCLIP);
58 }
59 return $entries;
60 }

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

+ Here is the call graph for this function:

◆ getSearchLinkType()

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

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

74 : string
75 {
76 return (string) \ilSession::get(self::KEY_SLTYPE);
77 }

References ilSession\get().

+ 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.

86 : void
87 {
88 \ilSession::set(self::KEY_NLTYPE, $type);
89 }
$type

References $type, and ilSession\set().

+ 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.

103 : void
104 {
105 \ilSession::set(self::KEY_PHRASE_DATA, $data);
106 }

References $data, and ilSession\set().

+ 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.

69 : void
70 {
71 \ilSession::set(self::KEY_SLTYPE, $type);
72 }

References $type, and ilSession\set().

+ 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: