4require_once 
'Services/Membership/classes/class.ilParticipants.php';
 
   43        $this->tree = 
$DIC->repositoryTree();
 
   44        $this->access = 
$DIC->access();
 
   59        $short_desc = $this->
settings->get(
"rep_shorten_description");
 
   60        $short_desc_max_length = $this->
settings->get(
"rep_shorten_description_length");
 
   62        if (!is_array($objTypes) || $objTypes === []) {
 
   63            $objTypes = $this->
repository->getValidObjectTypes();
 
   67        foreach ($this->
repository->getForUser($this->actor, $objTypes, $this->actor->getLanguage()) as $item) {
 
   68            $refId = $item->getRefId();
 
   69            $objId = $item->getObjId();
 
   70            $parentRefId = $item->getParentRefId();
 
   71            $title = $item->getTitle();
 
   72            $parentTreeLftValue = $item->getParentLftTree();
 
   73            $parentTreeLftValue = sprintf(
"%010d", $parentTreeLftValue);
 
   75            if (!$this->access->checkAccess(
'visible', 
'', 
$refId)) {
 
   79            $periodStart = $periodEnd = 
null;
 
   80            if ($item->getPeriodStart() !== 
null && $item->getPeriodEnd() !== 
null) {
 
   81                if ($item->objectPeriodHasTime()) {
 
   90            $description = $item->getDescription();
 
   91            if ($short_desc && $short_desc_max_length) {
 
   95            $references[$parentTreeLftValue . $title . 
$refId] = [
 
   98                'type' => $item->getType(),
 
  100                'description' => $description,
 
  101                'parent_ref' => $parentRefId,
 
  102                'start' => $periodStart,
 
  114    public function getItems($object_type_white_list = array())
 
An exception for terminatinating execution or to throw for unit testing.
@classDescription Date and time handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPDSelectedItemsBlockMembershipsProvider.
__construct(ilObjUser $actor)
ilPDSelectedItemsBlockSelectedItemsProvider constructor.
getItems($object_type_white_list=array())
array An array of repository items, each given as a structured array
getObjectsByMembership(array $objTypes=[])
Gets all objects the current user is member of.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
Interface ilPDSelectedItemsBlockProvider.