ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilPRGMessageCollection Class Reference

Holds information about multi-actions, mainly in context of member-assignemnts and status changes. More...

+ Collaboration diagram for ilPRGMessageCollection:

Public Member Functions

 withNewTopic (string $description)
 
 getSuccess ()
 
 getErrors ()
 
 hasSuccess ()
 
 hasErrors ()
 
 hasAnyMessages ()
 
 getDescription ()
 
 add (bool $success, string $message, string $record_identitifer)
 

Protected Attributes

array $success = []
 
array $error = []
 
string $description = ''
 

Detailed Description

Holds information about multi-actions, mainly in context of member-assignemnts and status changes.

Definition at line 25 of file ilPRGMessageCollection.php.

Member Function Documentation

◆ add()

ilPRGMessageCollection::add ( bool  $success,
string  $message,
string  $record_identitifer 
)

Definition at line 76 of file ilPRGMessageCollection.php.

References $message, and ILIAS\UI\examples\MessageBox\Success\success().

Referenced by changeAmountOfPoints(), changeProgressDeadline(), changeProgressValidityDate(), markAccredited(), ilObjStudyProgrammeMembersGUI\markAccreditedByProgressId(), markNotRelevant(), markRelevant(), unmarkAccredited(), ilObjStudyProgrammeMembersGUI\unmarkAccreditedByProgressId(), ilObjStudyProgrammeIndividualPlanGUI\updateRequiredPoints(), and ilObjStudyProgrammeIndividualPlanGUI\updateStatus().

76  : void
77  {
78  $entry = [$message, $record_identitifer];
79  if ($success) {
80  $this->success[] = $entry;
81  } else {
82  $this->error[] = $entry;
83  }
84  }
success()
description: > Example for rendering a success message box.
Definition: success.php:33
$message
Definition: xapiexit.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDescription()

ilPRGMessageCollection::getDescription ( )

Definition at line 71 of file ilPRGMessageCollection.php.

References $description.

Referenced by ilPRGMessagePrinter\showMessages().

71  : string
72  {
73  return $this->description;
74  }
+ Here is the caller graph for this function:

◆ getErrors()

ilPRGMessageCollection::getErrors ( )
Returns
string[]

Definition at line 51 of file ilPRGMessageCollection.php.

References $error.

Referenced by ilPRGMessagePrinter\showMessages().

51  : array
52  {
53  return $this->error;
54  }
+ Here is the caller graph for this function:

◆ getSuccess()

ilPRGMessageCollection::getSuccess ( )
Returns
string[]

Definition at line 43 of file ilPRGMessageCollection.php.

References $success.

Referenced by ilPRGMessagePrinter\showMessages().

43  : array
44  {
45  return $this->success;
46  }
+ Here is the caller graph for this function:

◆ hasAnyMessages()

ilPRGMessageCollection::hasAnyMessages ( )

Definition at line 66 of file ilPRGMessageCollection.php.

References ILIAS\UI\examples\MessageBox\Success\success().

66  : bool
67  {
68  return count($this->error) > 0 || count($this->success) > 0;
69  }
success()
description: > Example for rendering a success message box.
Definition: success.php:33
+ Here is the call graph for this function:

◆ hasErrors()

ilPRGMessageCollection::hasErrors ( )

Definition at line 61 of file ilPRGMessageCollection.php.

Referenced by ilPRGMessagePrinter\showMessages().

61  : bool
62  {
63  return count($this->error) > 0;
64  }
+ Here is the caller graph for this function:

◆ hasSuccess()

ilPRGMessageCollection::hasSuccess ( )

Definition at line 56 of file ilPRGMessageCollection.php.

References ILIAS\UI\examples\MessageBox\Success\success().

Referenced by ilPRGMessagePrinter\showMessages().

56  : bool
57  {
58  return count($this->success) > 0;
59  }
success()
description: > Example for rendering a success message box.
Definition: success.php:33
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withNewTopic()

ilPRGMessageCollection::withNewTopic ( string  $description)

Definition at line 31 of file ilPRGMessageCollection.php.

References $description.

Referenced by ilPRGMessagePrinter\getMessageCollection(), and ilStudyProgrammeGUIMessagesTest\testAddErrorMessages().

32  {
33  $clone = clone $this;
34  $clone->success = [];
35  $clone->error = [];
36  $clone->description = $description;
37  return $clone;
38  }
Holds information about multi-actions, mainly in context of member-assignemnts and status changes...
+ Here is the caller graph for this function:

Field Documentation

◆ $description

string ilPRGMessageCollection::$description = ''
protected

Definition at line 29 of file ilPRGMessageCollection.php.

Referenced by getDescription(), and withNewTopic().

◆ $error

array ilPRGMessageCollection::$error = []
protected

Definition at line 28 of file ilPRGMessageCollection.php.

Referenced by getErrors().

◆ $success

array ilPRGMessageCollection::$success = []
protected

Definition at line 27 of file ilPRGMessageCollection.php.

Referenced by getSuccess().


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