ILIAS  release_8 Revision v8.23
ilForumLP Class Reference

Class ilForumLP. More...

+ Inheritance diagram for ilForumLP:
+ Collaboration diagram for ilForumLP:

Public Member Functions

 appendModeConfiguration (int $mode, ilRadioOption $modeElement)
 
 saveModeConfiguration (ilPropertyFormGUI $form, bool &$modeChanged)
 
 getDefaultMode ()
 
 getValidModes ()
 
- Public Member Functions inherited from ilObjectLP
 resetCaches ()
 
 isAnonymized ()
 
 getDefaultMode ()
 
 getValidModes ()
 
 getCurrentMode ()
 
 isActive ()
 
 getModeText (int $mode)
 
 getModeInfoText (int $mode)
 
 getSettingsInfo ()
 
 getCollectionInstance ()
 
 getMembers (bool $search=true)
 
 resetLPDataForCompleteObject (bool $recursive=true)
 
 resetLPDataForUserIds (array $user_ids, bool $recursive=true)
 
 handleToTrash ()
 
 handleDelete ()
 
 getMailTemplateId ()
 
 hasIndividualModeOptions ()
 
 initInvidualModeOptions (ilRadioGroupInputGUI $modeRadio)
 
 shouldFetchIndividualModeFromFormSubmission ()
 
 fetchIndividualModeFromFormSubmission (ilPropertyFormGUI $form)
 
 appendModeConfiguration (int $mode, ilRadioOption $modeElement)
 
 saveModeConfiguration (ilPropertyFormGUI $form, bool &$modeChanged)
 

Static Public Member Functions

static getDefaultModes (bool $lp_active)
 
- Static Public Member Functions inherited from ilObjectLP
static getInstance (int $obj_id)
 
static getTypeClass (string $type)
 
static getSupportedObjectTypes ()
 
static isSupportedObjectType (string $type)
 
static handleMove (int $source_ref_id)
 
static getLPMemberships (int $usr_id, array $obj_ids, ?int $parent_ref_id=null, bool $mapped_ref_ids=false)
 Get all objects where given user is member (from LP POV) More...
 
static supportsSpentSeconds (string $obj_type)
 
static supportsMark (string $obj_type)
 
static supportsMatrixView (string $obj_type)
 
static getDefaultModes (bool $lp_active)
 Get available type-specific default modes (no administration needed) More...
 
static saveTypeDefaults (array $data)
 
static getTypeDefault (string $type)
 

Additional Inherited Members

- Protected Member Functions inherited from ilObjectLP
 __construct (int $obj_id)
 
 resetCustomLPDataForUserIds (array $user_ids, bool $recursive=true)
 
 gatherLPUsers ()
 
 updateParentCollections ()
 
- Static Protected Member Functions inherited from ilObjectLP
static isLPMember (array &$res, int $usr_id, array $obj_ids)
 Find (lp-relevant) members for given object ids. More...
 
static findMembershipsByPath (array &$res, int $usr_id, int $parent_ref_id, array $obj_ids, bool $mapped_ref_ids=false)
 Find (lp-relevant) memberships by path. More...
 
static getTypeDefaultFromDB (string $type)
 
- Protected Attributes inherited from ilObjectLP
ilTree $tree
 
ilDBInterface $db
 
ilObjectDefinition $objectDefinition
 
int $obj_id
 
ilLPCollection $collection_instance = null
 
int $mode = null
 
- Static Protected Attributes inherited from ilObjectLP
static array $type_defaults = null
 

Detailed Description

Class ilForumLP.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 25 of file class.ilForumLP.php.

Member Function Documentation

◆ appendModeConfiguration()

ilForumLP::appendModeConfiguration ( int  $mode,
ilRadioOption  $modeElement 
)

Definition at line 27 of file class.ilForumLP.php.

References $DIC, ilRadioOption\addSubItem(), ilNumberInputGUI\allowDecimals(), ilForumProperties\getInstance(), and ilLPObjSettings\LP_MODE_CONTRIBUTION_TO_DISCUSSION.

27  : void
28  {
29  global $DIC;
30 
32  $num_postings = new ilNumberInputGUI(
33  $DIC->language()->txt('trac_frm_contribution_num_postings'),
34  'number_of_postings'
35  );
36  $num_postings->allowDecimals(false);
37  $num_postings->setMinValue(1);
38  $num_postings->setMaxValue(99999);
39  $num_postings->setSize(4);
40  $num_postings->setRequired(true);
41  if (is_int(ilForumProperties::getInstance($this->obj_id)->getLpReqNumPostings())) {
42  $requiredNumberOfPostings = ilForumProperties::getInstance($this->obj_id)->getLpReqNumPostings();
43  $num_postings->setValue((string) $requiredNumberOfPostings);
44  }
45  $modeElement->addSubItem($num_postings);
46  }
47  }
static getInstance(int $a_obj_id=0)
const LP_MODE_CONTRIBUTION_TO_DISCUSSION
global $DIC
Definition: feed.php:28
allowDecimals(bool $a_value)
This class represents a number property in a property form.
+ Here is the call graph for this function:

◆ getDefaultMode()

ilForumLP::getDefaultMode ( )

Definition at line 83 of file class.ilForumLP.php.

References ilLPObjSettings\LP_MODE_DEACTIVATED.

83  : int
84  {
86  }

◆ getDefaultModes()

static ilForumLP::getDefaultModes ( bool  $lp_active)
static

Definition at line 69 of file class.ilForumLP.php.

References ilLPObjSettings\LP_MODE_CONTRIBUTION_TO_DISCUSSION, and ilLPObjSettings\LP_MODE_DEACTIVATED.

69  : array
70  {
71  if (true === $lp_active) {
72  return [
75  ];
76  }
77 
78  return [
80  ];
81  }
const LP_MODE_CONTRIBUTION_TO_DISCUSSION

◆ getValidModes()

ilForumLP::getValidModes ( )

◆ saveModeConfiguration()

ilForumLP::saveModeConfiguration ( ilPropertyFormGUI  $form,
bool &  $modeChanged 
)

Definition at line 49 of file class.ilForumLP.php.

References ilPropertyFormGUI\getInput(), and ilForumProperties\getInstance().

49  : void
50  {
51  $frm_properties = ilForumProperties::getInstance($this->obj_id);
52 
53  $current_value = $frm_properties->getLpReqNumPostings();
54 
55  if (is_numeric($form->getInput('number_of_postings'))) {
56  $frm_properties->setLpReqNumPostings(
57  (int) $form->getInput('number_of_postings')
58  );
59  } else {
60  $frm_properties->setLpReqNumPostings(null);
61  }
62  $frm_properties->update();
63 
64  if ($current_value !== $frm_properties->getLpReqNumPostings()) {
65  $modeChanged = true;
66  }
67  }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
static getInstance(int $a_obj_id=0)
+ Here is the call graph for this function:

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