ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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

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

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

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

+ Here is the call graph for this function:

◆ clearSearchLinkType()

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

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

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

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

+ Here is the call graph for this function:

◆ getNewLinkType()

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

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

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

References ilSession\get().

+ Here is the call graph for this function:

◆ getQuestionsFromClipboard()

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

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

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

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

+ Here is the call graph for this function:

◆ getSearchLinkType()

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

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

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

References ilSession\get().

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

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

References ilSession\set().

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

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

References 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_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: