34        string $a_parent_cmd = 
"",
 
   35        int $a_perm_ref_id = 0
 
   39        $this->
ctrl = $DIC->ctrl();
 
   40        $this->
lng = $DIC->language();
 
   41        $this->
access = $DIC->access();
 
   42        $ilCtrl = 
$DIC->ctrl();
 
   47        $this->perm_ref_id = $a_perm_ref_id;
 
   48        $this->news_access = 
new NewsAccess($this->perm_ref_id);
 
   60            "tpl.table_row_news_for_context.html",
 
   69    protected function fillRow(array $a_set): void
 
   76        $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
   79        if ($a_set[
"user_id"] > 0) {
 
   80            $this->tpl->setCurrentBlock(
"user_info");
 
   81            $user_obj = 
new ilObjUser($a_set[
"user_id"]);
 
   82            $this->tpl->setVariable(
"VAL_AUTHOR", $user_obj->getLogin());
 
   83            $this->tpl->setVariable(
"TXT_AUTHOR", 
$lng->
txt(
"author"));
 
   84            $this->tpl->parseCurrentBlock();
 
   88        if ($enable_internal_rss) {
 
   89            $this->tpl->setCurrentBlock(
"access");
 
   90            $this->tpl->setVariable(
"TXT_ACCESS", 
$lng->
txt(
"news_news_item_visibility"));
 
   92                ((
int) $a_set[
"priority"] === 0 &&
 
   95                    "public_notifications",
 
   97                    $a_set[
"context_obj_id"]
 
   99                $this->tpl->setVariable(
"VAL_ACCESS", 
$lng->
txt(
"news_visibility_public"));
 
  101                $this->tpl->setVariable(
"VAL_ACCESS", 
$lng->
txt(
"news_visibility_users"));
 
  103            $this->tpl->parseCurrentBlock();
 
  107        if ($a_set[
"creation_date"] !== $a_set[
"update_date"]) {
 
  108            $this->tpl->setCurrentBlock(
"ni_update");
 
  109            $this->tpl->setVariable(
"TXT_LAST_UPDATE", 
$lng->
txt(
"last_update"));
 
  110            $this->tpl->setVariable(
 
  114            $this->tpl->parseCurrentBlock();
 
  118        $this->tpl->setVariable(
 
  122        $this->tpl->setVariable(
"TXT_CREATED", 
$lng->
txt(
"created"));
 
  125        $this->tpl->setVariable(
"VAL_TITLE", $a_set[
"title"]);
 
  128        if ($a_set[
"content"] != 
"") {
 
  129            $this->tpl->setCurrentBlock(
"content");
 
  130            $this->tpl->setVariable(
 
  134            $this->tpl->parseCurrentBlock();
 
  142        if ($this->news_access->canEdit($news_item)) {
 
  143            $this->tpl->setCurrentBlock(
"edit");
 
  144            $this->tpl->setVariable(
"TXT_EDIT", 
$lng->
txt(
"edit"));
 
  145            $ilCtrl->setParameterByClass(
"ilnewsitemgui", 
"news_item_id", $a_set[
"id"]);
 
  146            $this->tpl->setVariable(
 
  148                $ilCtrl->getLinkTargetByClass(
"ilnewsitemgui", 
"editNewsItem")
 
  150            $this->tpl->parseCurrentBlock();
 
  153        if ($this->news_access->canDelete($news_item)) {
 
  154            $this->tpl->setCurrentBlock(
"cb");
 
  155            $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
 
  156            $this->tpl->parseCurrentBlock();
 
  160        $this->tpl->setVariable(
 
  162            $lng->
txt(
"obj_" . $a_set[
"context_obj_type"]) . 
":<br />" .
 
static _lookup(string $a_type, string $a_setting, int $a_user=0, int $a_block_id=0)
Lookup setting from database.
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
@classDescription Date and time handling
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
TableGUI class for table NewsForContext.
 
__construct(ilNewsItemGUI $a_parent_obj, string $a_parent_cmd="", int $a_perm_ref_id=0)
 
fillRow(array $a_set)
Standard Version of Fill Row.
 
User Interface for NewsItem entities.
 
A news item can be created by different sources.
 
static _lookupTitle(int $obj_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc