ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilNewsForContextBlockGUI Class Reference

BlockGUI class for block NewsForContext. More...

+ Inheritance diagram for ilNewsForContextBlockGUI:
+ Collaboration diagram for ilNewsForContextBlockGUI:

Public Member Functions

 __construct ()
 
 getBlockType ()
 
 executeCommand ()
 
 getHTML ()
 
 handleView ()
 Handles show/hide notification view and removes notifications if hidden. More...
 
 getOverview ()
 
 makeClickable (string $a_str)
 
 showNotifications ()
 
 hideNotifications ()
 
 editSettings ()
 Show settings screen. More...
 
 initSettingsForm ()
 Init setting form. More...
 
 cancelSettings ()
 
 saveSettings ()
 
 showFeedUrl ()
 
 getDynamicReload ()
 
 getJSEnabler ()
 
 disableJS ()
 
 enableJS ()
 
 getNoItemFoundContent ()
 
- Public Member Functions inherited from ilBlockGUI
 __construct ()
 
 getBlockType ()
 
 setData (array $a_data)
 
 getData ()
 
 setPresentation (int $type)
 
 getPresentation ()
 
 setBlockId (string $a_block_id="0")
 
 getBlockId ()
 
 setGuiObject (object $a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setOffset (int $a_offset)
 
 getOffset ()
 
 checkOffset (int $offset)
 
 setLimit (int $a_limit)
 
 getLimit ()
 
 setEnableEdit (bool $a_enableedit)
 
 getEnableEdit ()
 
 setRepositoryMode (bool $a_repositorymode)
 
 getRepositoryMode ()
 
 setSubtitle (string $a_subtitle)
 
 getSubtitle ()
 
 setRefId (int $a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 
 setAdminCommands (bool $a_admincommands)
 
 getAdminCommands ()
 
 setEnableNumInfo (bool $a_enablenuminfo)
 
 getEnableNumInfo ()
 
 setProperties (array $a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty (string $a_property)
 
 setProperty (string $a_property, string $a_value)
 
 setRowTemplate (string $a_rowtemplatename, string $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 
 getRowTemplateDir ()
 
 addBlockCommand (string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
 
 getBlockCommands ()
 
 getHTML ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 getPaginationViewControl ()
 Fill previous/next row. More...
 
 getViewControlsForPanel ()
 
 sortObject ()
 
 addSortOption (string $option, string $label, bool $active)
 
 setSortTarget (string $target)
 
 addPresentation (string $label, string $target, bool $active)
 
 getNoItemFoundContent ()
 

Static Public Member Functions

static getScreenMode ()
 
static addToSettingsForm (ilFormPropertyGUI $a_input)
 Add inputs to the container news settings form to configure also the contextBlock options. More...
 
static writeSettings (array $a_values)
 
static getScreenMode ()
 

Data Fields

const OBJECTS_WITH_NEWS_SUBTAB = ["category", "course", "group", "forum"]
 object type names with settings->news settings subtab More...
 
- Data Fields inherited from ilBlockGUI
const PRES_MAIN_LEG = 0
 
const PRES_SEC_LEG = 1
 
const PRES_SEC_LIST = 2
 
const PRES_MAIN_LIST = 3
 
const PRES_MAIN_TILE = 4
 

Static Public Attributes

static string $block_type = "news"
 

Protected Member Functions

 initData (NewsCollection $collection)
 
 preloadData (array $data)
 Method will be called before rendering the block. More...
 
 getListItemForData (array $data)
 Get list item for data array. More...
 
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 getMediaPath (int $mob_id)
 
 downloadMob ()
 
- Protected Member Functions inherited from ilBlockGUI
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 specialCharsAsEntities (string $string)
 
 initCommands ()
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 getLegacyContent ()
 Get legacy content. More...
 
 getListItemForData (array $data)
 Get list item for data array. More...
 
 handleNavigation ()
 Handle navigation. More...
 
 loadData ()
 Load data for current page. More...
 
 getListItemGroups ()
 Get items. More...
 
 addRepoCommands ()
 Add repo commands. More...
 
 getActionsForPanel ()
 
 send (string $output)
 Send. More...
 

Protected Attributes

NewsAccess $news_access
 
bool $dynamic = false
 
bool $show_view_selection
 
string $view
 
ilPropertyFormGUI $settings_form
 
ilHelpGUI $help
 
ilSetting $settings
 
ilTabsGUI $tabs
 
StandardGUIRequest $std_request
 
InternalDomainService $domain
 
InternalGUIService $gui
 
bool $prevent_initial_loading = false
 
NewsCollection $collection
 
- Protected Attributes inherited from ilBlockGUI
ILIAS UI Renderer $renderer
 
Factory $factory
 
object $gui_object
 
ILIAS Container Block StandardGUIRequest $request
 
ILIAS Container Block BlockManager $block_manager
 
bool $repositorymode = false
 
ILIAS DI UIServices $ui
 
array $data = array()
 
bool $enablenuminfo = true
 
array $footer_links = array()
 
string $block_id = "0"
 
bool $allow_moving = true
 
array $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
array $block_commands = array()
 
int $max_count = 0
 
bool $close_command = false
 
bool $image = false
 
array $property = []
 
string $nav_value = ""
 
string $css_row = ""
 
string $title = ""
 
bool $admincommands = false
 
array $dropdown
 
ilTemplate $tpl
 
ilGlobalTemplateInterface $main_tpl
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilAccessHandler $access
 
ilLanguage $lng
 
ilObjectDefinition $obj_def
 
int $presentation
 
int $requested_ref_id
 

Private Member Functions

 loadNewsData ()
 
 getNewsForId (int $news_id)
 

Detailed Description

BlockGUI class for block NewsForContext.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_IsCalledBy ilNewsForContextBlockGUI: ilColumnGUI @ilCtrl_Calls ilNewsForContextBlockGUI: ilNewsItemGUI

Definition at line 34 of file class.ilNewsForContextBlockGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilNewsForContextBlockGUI::__construct ( )

Reimplemented from ilBlockGUI.

Reimplemented in ilPDNewsBlockGUI.

Definition at line 61 of file class.ilNewsForContextBlockGUI.php.

62 {
63 global $DIC;
64
66
67 $this->help = $DIC["ilHelp"];
68 $this->settings = $DIC->settings();
69 $this->tabs = $DIC->tabs();
70
71 $locator = $DIC->news()->internal();
72 $this->std_request = $locator->gui()->standardRequest();
73 $this->domain = $locator->domain();
74 $this->gui = $locator->gui();
75 $this->news_access = new NewsAccess($this->std_request->getRefId());
76
77 $this->lng->loadLanguageModule("news");
78 $DIC->help()->addHelpSection("news_block");
79
80 $this->setBlockId((string) $this->ctrl->getContextObjId());
81 $this->setLimit(5);
82 $this->setEnableNumInfo(true);
83
84 if (!$this->prevent_initial_loading) {
85 $this->loadNewsData();
86 }
87
88 $this->setTitle($this->lng->txt("news_internal_news"));
89 $this->setRowTemplate("tpl.block_row_news_for_context.html", "components/ILIAS/News");
90 $this->allow_moving = false;
91 $this->handleView();
92
93 $this->setPresentation(self::PRES_SEC_LIST);
94 }
setTitle(string $a_title)
setPresentation(int $type)
setBlockId(string $a_block_id="0")
setLimit(int $a_limit)
setEnableNumInfo(bool $a_enablenuminfo)
setRowTemplate(string $a_rowtemplatename, string $a_rowtemplatedir="")
Set Row Template Name.
handleView()
Handles show/hide notification view and removes notifications if hidden.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), handleView(), ILIAS\Repository\help(), ILIAS\Repository\lng(), loadNewsData(), ilBlockGUI\setBlockId(), ilBlockGUI\setEnableNumInfo(), ilBlockGUI\setLimit(), ilBlockGUI\setPresentation(), ilBlockGUI\setRowTemplate(), ILIAS\Repository\settings(), ilBlockGUI\setTitle(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Member Function Documentation

◆ addToSettingsForm()

static ilNewsForContextBlockGUI::addToSettingsForm ( ilFormPropertyGUI  $a_input)
static

Add inputs to the container news settings form to configure also the contextBlock options.

Definition at line 887 of file class.ilNewsForContextBlockGUI.php.

887 : void
888 {
889 global $DIC;
890
891 $std_request = $DIC->news()
892 ->internal()
893 ->gui()
894 ->standardRequest();
895
896 $lng = $DIC->language();
897 $block_id = $DIC->ctrl()->getContextObjId();
898
899 $news_set = new ilSetting("news");
900 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
901
902 $public_feed = ilBlockSetting::_lookup(
903 self::$block_type,
904 "public_feed",
905 0,
907 );
908 $default_visibility = ilBlockSetting::_lookup(self::$block_type, "default_visibility", 0, $block_id);
909 if ($default_visibility == "") {
910 $default_visibility =
912 }
913 $radio_group = new ilRadioGroupInputGUI($lng->txt("news_default_visibility"), "default_visibility");
914 $radio_option = new ilRadioOption($lng->txt("news_visibility_users"), "users");
915 $radio_group->addOption($radio_option);
916 $radio_option = new ilRadioOption($lng->txt("news_visibility_public"), "public");
917 $radio_group->addOption($radio_option);
918 $radio_group->setInfo($lng->txt("news_news_item_visibility_info"));
919 $radio_group->setRequired(false);
920 $radio_group->setValue($default_visibility);
921 $a_input->addSubItem($radio_group);
922
923 // extra rss feed
924 if ($enable_internal_rss) {
925 $radio_rss = new ilCheckboxInputGUI(
926 $lng->txt("news_public_feed"),
927 "notifications_public_feed"
928 );
929 $radio_rss->setInfo($lng->txt("news_public_feed_info"));
930 $radio_rss->setChecked((bool) $public_feed);
931 $a_input->addSubItem($radio_rss);
932 }
933 }
ilLanguage $lng
static _lookup(string $a_type, string $a_setting, int $a_user=0, int $a_block_id=0)
Lookup setting from database.
This class represents a checkbox property in a property form.
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...
static _getDefaultVisibilityForRefId(int $a_ref_id)
Get default visibility for reference id.
This class represents a property in a property form.
This class represents an option in a radio group.
ILIAS Setting Class.

References ilBlockGUI\$block_id, $DIC, ilBlockGUI\$lng, $std_request, ilNewsItem\_getDefaultVisibilityForRefId(), ilBlockSetting\_lookup(), ILIAS\News\StandardGUIRequest\getRefId(), and ilLanguage\txt().

Referenced by ilContainerNewsSettingsGUI\initForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancelSettings()

ilNewsForContextBlockGUI::cancelSettings ( )

Definition at line 945 of file class.ilNewsForContextBlockGUI.php.

945 : void
946 {
947 $ilCtrl = $this->ctrl;
948
949 $ilCtrl->returnToParent($this);
950 }
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
@inheritDoc

References ilBlockGUI\$ctrl, and ilCtrl\returnToParent().

+ Here is the call graph for this function:

◆ disableJS()

ilNewsForContextBlockGUI::disableJS ( )

Definition at line 1119 of file class.ilNewsForContextBlockGUI.php.

1119 : void
1120 {
1121 $ilCtrl = $this->ctrl;
1122 $ilUser = $this->user;
1123
1124 ilSession::set("il_feed_js", "n");
1125 $ilUser->writePref("il_feed_js", "n");
1126 $ilCtrl->returnToParent($this);
1127 }
ilObjUser $user
static set(string $a_var, $a_val)
Set a value.

References ilBlockGUI\$ctrl, ilBlockGUI\$user, and ilSession\set().

+ Here is the call graph for this function:

◆ downloadMob()

ilNewsForContextBlockGUI::downloadMob ( )
protected

Definition at line 1142 of file class.ilNewsForContextBlockGUI.php.

1142 : void
1143 {
1144 $news_id = $this->std_request->getNewsId();
1145 $news = new ilNewsItem($news_id);
1146 $news->deliverMobFile("Standard", true);
1147 }
A news item can be created by different sources.

◆ editSettings()

ilNewsForContextBlockGUI::editSettings ( )

Show settings screen.

Definition at line 743 of file class.ilNewsForContextBlockGUI.php.

743 : string
744 {
745 $this->initSettingsForm();
746 return $this->settings_form->getHTML();
747 }

References initSettingsForm().

Referenced by ilPDNewsBlockGUI\changeFeedSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableJS()

ilNewsForContextBlockGUI::enableJS ( )

Definition at line 1129 of file class.ilNewsForContextBlockGUI.php.

1129 : void
1130 {
1131 $ilUser = $this->user;
1132 ilSession::set("il_feed_js", "y");
1133 $ilUser->writePref("il_feed_js", "y");
1134 $this->send($this->getHTML());
1135 }
send(string $output)
Send.

References ilBlockGUI\$user, getHTML(), ilBlockGUI\send(), and ilSession\set().

+ Here is the call graph for this function:

◆ executeCommand()

ilNewsForContextBlockGUI::executeCommand ( )

Reimplemented in ilPDNewsBlockGUI.

Definition at line 247 of file class.ilNewsForContextBlockGUI.php.

248 {
249 if (strcasecmp($this->ctrl->getNextClass(), ilNewsItemGUI::class) === 0) {
250 $news_item_gui = new ilNewsItemGUI();
251 $news_item_gui->setEnableEdit($this->getEnableEdit());
252 return $this->ctrl->forwardCommand($news_item_gui);
253 }
254
255 $cmd = $this->ctrl->getCmd("getHTML");
256 return $this->$cmd();
257 }
User Interface for NewsItem entities.

References ILIAS\Repository\ctrl(), and ilBlockGUI\getEnableEdit().

+ Here is the call graph for this function:

◆ getBlockType()

ilNewsForContextBlockGUI::getBlockType ( )

Reimplemented from ilBlockGUI.

Reimplemented in ilPDNewsBlockGUI.

Definition at line 213 of file class.ilNewsForContextBlockGUI.php.

213 : string
214 {
215 return self::$block_type;
216 }

References $block_type.

Referenced by getDynamicReload(), getHTML(), getJSEnabler(), hideNotifications(), initSettingsForm(), saveSettings(), and showNotifications().

+ Here is the caller graph for this function:

◆ getDynamicReload()

ilNewsForContextBlockGUI::getDynamicReload ( )

Definition at line 1069 of file class.ilNewsForContextBlockGUI.php.

1069 : string
1070 {
1071 $ilCtrl = $this->ctrl;
1072 $lng = $this->lng;
1073
1074 $ilCtrl->setParameterByClass(
1075 ilColumnGUI::class,
1076 "block_id",
1077 "block_" . $this->getBlockType() . "_" . $this->getBlockId()
1078 );
1079
1080 $rel_tpl = new ilTemplate("tpl.dynamic_reload.html", true, true, "components/ILIAS/News");
1081 $rel_tpl->setVariable("TXT_LOADING", $lng->txt("news_loading_news"));
1082 $rel_tpl->setVariable("BLOCK_ID", "block_" . $this->getBlockType() . "_" . $this->getBlockId());
1083 $rel_tpl->setVariable(
1084 "TARGET",
1085 $ilCtrl->getLinkTargetByClass(ilColumnGUI::class, "updateBlock", "", true)
1086 );
1087
1088 // no JS
1089 $rel_tpl->setVariable("TXT_NEWS_CLICK_HERE", $lng->txt("news_no_js_click_here"));
1090 $rel_tpl->setVariable(
1091 "TARGET_NO_JS",
1092 $ilCtrl->getLinkTarget($this, "disableJS")
1093 );
1094
1095 return $rel_tpl->get();
1096 }
special template class to simplify handling of ITX/PEAR

References ilBlockGUI\$ctrl, ilBlockGUI\$lng, ilBlockGUI\getBlockId(), getBlockType(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getHTML()

ilNewsForContextBlockGUI::getHTML ( )

Reimplemented from ilBlockGUI.

Reimplemented in ilPDNewsBlockGUI.

Definition at line 259 of file class.ilNewsForContextBlockGUI.php.

259 : string
260 {
261 global $DIC;
262
263 $ilCtrl = $this->ctrl;
265 $ilUser = $this->user;
266
267 $news_set = new ilSetting("news");
268 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
269
270 $hide_block = ilBlockSetting::_lookup(
271 $this->getBlockType(),
272 "hide_news_block",
273 0,
274 (int) $this->block_id
275 );
276
277 if ($this->getProperty("title") != "") {
278 $this->setTitle($this->getProperty("title"));
279 }
280
281 $public_feed = ilBlockSetting::_lookup(
282 $this->getBlockType(),
283 "public_feed",
284 0,
285 (int) $this->block_id
286 );
287 if ($public_feed && $enable_internal_rss) {
288 // @todo: rss icon HTML: ilRSSButtonGUI::get(ilRSSButtonGUI::ICON_RSS)
289 $this->addBlockCommand(
290 ILIAS_HTTP_PATH . "/feed.php?client_id=" . rawurlencode(CLIENT_ID) . "&" .
291 "ref_id=" . $this->std_request->getRefId(),
292 $lng->txt("news_feed_url")
293 );
294 }
295
296 // add edit commands
297 if ($this->news_access->canAdd()) {
298 $this->addBlockCommand(
299 $ilCtrl->getLinkTargetByClass(ilNewsItemGUI::class, "editNews"),
300 $lng->txt("edit")
301 );
302
303 $ilCtrl->setParameter($this, "add_mode", "block");
304 $this->addBlockCommand(
305 $ilCtrl->getLinkTargetByClass(ilNewsItemGUI::class, "createNewsItem"),
306 $lng->txt("add")
307 );
308 $ilCtrl->setParameter($this, "add_mode", "");
309 }
310
311 if ($this->getProperty("settings")) {
312 $ref_id = $this->std_request->getRefId();
313 $obj_def = $DIC["objDefinition"];
315 $obj_type = ilObject::_lookupType($ref_id, true);
316 $obj_class = strtolower($obj_def->getClassName($obj_type));
317 $parent_gui = "ilobj" . $obj_class . "gui";
318
319 $ilCtrl->setParameterByClass(ilContainerNewsSettingsGUI::class, "ref_id", $ref_id);
320
321 if (in_array($obj_class, self::OBJECTS_WITH_NEWS_SUBTAB)) {
322 $this->addBlockCommand(
323 $ilCtrl->getLinkTargetByClass([ilRepositoryGUI::class, $parent_gui, ilContainerNewsSettingsGUI::class], "show"),
324 $lng->txt("settings")
325 );
326 } else {
327 // not sure if this code is still used anywhere, see discussion at
328 // https://mantis.ilias.de/view.php?id=31801
329 // If ILIAS 8 beta phase does not throw this exception, we can remove this part.
330 //throw new ilException("News settings are deprecated.");
331 // the info screen will call this
332 $this->addBlockCommand(
333 $ilCtrl->getLinkTarget($this, "editSettings"),
334 $lng->txt("settings")
335 );
336 }
337 }
338
339 // do not display hidden repository news blocks for users
340 // who do not have write permission
341 if (!$this->getEnableEdit() && $this->getRepositoryMode() &&
343 $this->getBlockType(),
344 "hide_news_block",
345 0,
346 (int) $this->block_id
347 )) {
348 return "";
349 }
350
351 // do not display empty news blocks for users
352 // who do not have write permission
353 if (!$this->dynamic && !$this->getEnableEdit() && $this->getRepositoryMode() && count($this->getData()) === 0 &&
354 (
355 !$news_set->get("enable_rss_for_internal") ||
357 $this->getBlockType(),
358 "public_feed",
359 0,
360 (int) $this->block_id
361 )
362 )) {
363 return "";
364 }
365
366 $en = "";
367
368 return parent::getHTML() . $en;
369 }
ilObjectDefinition $obj_def
getProperty(string $a_property)
addBlockCommand(string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
getClassName(string $obj_name)
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
const CLIENT_ID
Definition: constants.php:41
$ref_id
Definition: ltiauth.php:66

References ilBlockGUI\$ctrl, $DIC, ilBlockGUI\$lng, ilBlockGUI\$obj_def, $ref_id, ilBlockGUI\$user, ilBlockSetting\_lookup(), ilObject\_lookupObjectId(), ilObject\_lookupType(), ilBlockGUI\addBlockCommand(), CLIENT_ID, getBlockType(), ilObjectDefinition\getClassName(), ilBlockGUI\getData(), ilBlockGUI\getEnableEdit(), ilBlockGUI\getProperty(), ilBlockGUI\getRepositoryMode(), ilBlockGUI\setTitle(), and ilLanguage\txt().

Referenced by enableJS(), hideNotifications(), and showNotifications().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getJSEnabler()

ilNewsForContextBlockGUI::getJSEnabler ( )

Definition at line 1098 of file class.ilNewsForContextBlockGUI.php.

1098 : string
1099 {
1100 $ilCtrl = $this->ctrl;
1101
1102 $ilCtrl->setParameterByClass(
1103 ilColumnGUI::class,
1104 "block_id",
1105 "block_" . $this->getBlockType() . "_" . $this->getBlockId()
1106 );
1107 //echo "hh";
1108 $rel_tpl = new ilTemplate("tpl.js_enabler.html", true, true, "components/ILIAS/News");
1109 $rel_tpl->setVariable("BLOCK_ID", "block_" . $this->getBlockType() . "_" . $this->getBlockId());
1110 $rel_tpl->setVariable(
1111 "TARGET",
1112 $ilCtrl->getLinkTarget($this, "enableJS", "", true, false)
1113 );
1114
1115 return $rel_tpl->get();
1116 }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc

References ilBlockGUI\$ctrl, ilBlockGUI\getBlockId(), getBlockType(), and ilCtrl\setParameterByClass().

Referenced by ilPDNewsBlockGUI\getHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getListItemForData()

ilNewsForContextBlockGUI::getListItemForData ( array  $data)
protected

Get list item for data array.

Parameters
array$data
Returns
null|\ILIAS\UI\Component\Item\Item

Reimplemented from ilBlockGUI.

Definition at line 133 of file class.ilNewsForContextBlockGUI.php.

134 {
135 try {
136 $info = $this->getNewsForId($data[0]);
137 } catch (\Exception $e) {
138 $this->logger->error($e->getMessage());
139 return $this->ui->factory()->item()->standard($this->lng->txt('news_not_available'))
140 ->withDescription($this->lng->txt('news_sorry_not_accessible_anymore'));
141 }
142
143
144 $props = [
145 $this->lng->txt('date') => $info['creation_date'] ?? ''
146 ];
147
148 $item = $this->ui->factory()->item()->standard(
149 $this->ui->factory()->link()->standard($info['news_title'] ?? '', $info['url'] ?? '')
150 )->withProperties($props);
151
152 if ($info['ref_id'] > 0) {
153 $item = $item->withDescription($info['type_txt'] . ': ' . $info['obj_title']);
154 }
155 return $item;
156 }
$info
Definition: entry_point.php:21
Common interface to all items.
Definition: Item.php:32

References Vendor\Package\$e, $info, getNewsForId(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getMediaPath()

ilNewsForContextBlockGUI::getMediaPath ( int  $mob_id)
protected

Definition at line 671 of file class.ilNewsForContextBlockGUI.php.

671 : string
672 {
673 $media_path = "";
674 if ($mob_id > 0) {
675 $mob = new ilObjMediaObject($mob_id);
676 $media_path = $mob->getStandardSrc();
677 }
678 return $media_path;
679 }

◆ getNewsForId()

ilNewsForContextBlockGUI::getNewsForId ( int  $news_id)
private

Definition at line 158 of file class.ilNewsForContextBlockGUI.php.

158 : array
159 {
160 $item = $this->collection->getById($news_id);
161 if ($item === null) {
162 throw new \InvalidArgumentException("News item with id {$news_id} not found.");
163 }
164
165 $grouping = $this->collection->getGroupingFor($item);
166
167 $creation_date = new ilDateTime($item->getCreationDate()->format('c'), IL_CAL_DATETIME);
170 $item->getContextObjType(),
171 $item->getTitle(),
172 $item->isContentIsLangVar(),
173 $grouping ? $grouping['agg_ref_id'] : 0,
174 $grouping ? $grouping['aggregation'] : [],
175 )
176 );
177
178 $info = [
179 'ref_id' => $item->getContextRefId(),
180 'creation_date' => ilDatePresentation::formatDate($creation_date),
181 'news_title' => $title,
182 ];
183
184 // title image type
185 if ($item->getContextRefId() > 0) {
186 $obj_id = $item->getContextObjId();
187 $type = $item->getContextObjType();
188
189 $lang_type = in_array($type, ['sahs', 'lm', 'htlm']) ? 'lres' : 'obj_' . $type;
190
191 $type_txt = ($this->obj_def->isPlugin($item->getContextObjType()))
192 ? ilObjectPlugin::lookupTxtById($item->getContextObjType(), $lang_type)
193 : $this->lng->txt($lang_type);
194
195 $info['type_txt'] = $type_txt;
196 $info['type_icon'] = ilObject::_getIcon($obj_id, 'tiny', $type);
197 $info['obj_title'] = ilStr::shortenWords(ilObject::_lookupTitle($obj_id));
198 $info['user_read'] = $this->collection->isReadByUser($this->user->getId(), $news_id);
199
200 $this->ctrl->setParameter($this, 'news_context', $item->getContextRefId());
201 } else {
202 $this->ctrl->setParameter($this, 'news_context', '');
203 }
204
205 $this->ctrl->setParameter($this, 'news_id', $item->getId());
206 $info['url'] = $this->ctrl->getLinkTarget($this, 'showNews');
207 $this->ctrl->clearParameters($this);
208
209 return $info;
210 }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
static determineNewsTitle(string $a_context_obj_type, string $a_title, bool $a_content_is_lang_var, int $a_agg_ref_id=0, array $a_aggregation=[], ?ilLanguage $lng=null)
Determine title for news item entry.
static lookupTxtById(string $plugin_id, string $lang_var)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupTitle(int $obj_id)
static shortenWords(string $a_str, int $a_len=30, bool $a_dots=true)
Ensure that the maximum word lenght within a text is not longer than $a_len.

References $info, ilBlockGUI\$title, ilObject\_getIcon(), ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), ilNewsItem\determineNewsTitle(), ilDatePresentation\formatDate(), IL_CAL_DATETIME, ILIAS\Repository\lng(), ilObjectPlugin\lookupTxtById(), ilStr\shortenWords(), and ILIAS\Repository\user().

Referenced by getListItemForData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNoItemFoundContent()

ilNewsForContextBlockGUI::getNoItemFoundContent ( )

Reimplemented from ilBlockGUI.

Definition at line 1137 of file class.ilNewsForContextBlockGUI.php.

1137 : string
1138 {
1139 return $this->lng->txt("news_no_news_items");
1140 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getOverview()

ilNewsForContextBlockGUI::getOverview ( )

Definition at line 406 of file class.ilNewsForContextBlockGUI.php.

406 : string
407 {
409
410 return '<div class="small">' . (count($this->getData())) . " " . $lng->txt("news_news_items") . "</div>";
411 }

References ilBlockGUI\$lng, ilBlockGUI\getData(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getScreenMode()

static ilNewsForContextBlockGUI::getScreenMode ( )
static

Reimplemented from ilBlockGUI.

Reimplemented in ilPDNewsBlockGUI.

Definition at line 223 of file class.ilNewsForContextBlockGUI.php.

223 : string
224 {
225 global $DIC;
226
227 $ilCtrl = $DIC->ctrl();
228
229 if (strcasecmp($ilCtrl->getCmdClass(), ilNewsItemGUI::class) === 0) {
230 return IL_SCREEN_FULL;
231 }
232
233 switch ($ilCtrl->getCmd()) {
234 case "showNews":
235 case "showFeedUrl":
236 return IL_SCREEN_CENTER;
237
238 case "editSettings":
239 case "saveSettings":
240 return IL_SCREEN_FULL;
241
242 default:
243 return IL_SCREEN_SIDE;
244 }
245 }
const IL_SCREEN_SIDE
const IL_SCREEN_CENTER
const IL_SCREEN_FULL

References $DIC, IL_SCREEN_CENTER, IL_SCREEN_FULL, and IL_SCREEN_SIDE.

◆ handleView()

ilNewsForContextBlockGUI::handleView ( )

Handles show/hide notification view and removes notifications if hidden.

Definition at line 374 of file class.ilNewsForContextBlockGUI.php.

374 : void
375 {
376 // it seems like this method does not change any state, so it may be removed in the future
377
378 /*$ilUser = $this->user;
379
380 $this->view = (string) ilBlockSetting::_lookup(
381 $this->getBlockType(),
382 "view",
383 $ilUser->getId(),
384 (int) $this->block_id
385 );
386
387 // check whether notices and messages exist
388 $got_notices = $got_messages = false;
389 foreach ($this->data as $row) {
390 if ((int) ($row["priority"] ?? 0) === 0) {
391 $got_notices = true;
392 }
393 if ((int) ($row["priority"] ?? 0) === 1) {
394 $got_messages = true;
395 }
396 }
397 $this->show_view_selection = false;
398
399 if ($got_notices && $got_messages) {
400 $this->show_view_selection = true;
401 } elseif ($got_notices) {
402 $this->view = "";
403 }*/
404 }

Referenced by __construct(), ilPDNewsBlockGUI\__construct(), hideNotifications(), and showNotifications().

+ Here is the caller graph for this function:

◆ hideNotifications()

ilNewsForContextBlockGUI::hideNotifications ( )

Definition at line 716 of file class.ilNewsForContextBlockGUI.php.

716 : void
717 {
718 $ilCtrl = $this->ctrl;
719 $ilUser = $this->user;
720
722 $this->getBlockType(),
723 "view",
724 "hide_notifications",
725 $ilUser->getId(),
726 (int) $this->block_id
727 );
728
729 // reload data
730 $this->loadNewsData();
731 $this->handleView();
732
733 if ($ilCtrl->isAsynch()) {
734 $this->send($this->getHTML());
735 }
736
737 $ilCtrl->returnToParent($this);
738 }
static _write(string $a_type, string $a_setting, string $a_value, int $a_user=0, int $a_block_id=0)
Write setting to database.

References ilBlockGUI\$ctrl, ilBlockGUI\$user, ilBlockSetting\_write(), getBlockType(), getHTML(), handleView(), loadNewsData(), and ilBlockGUI\send().

+ Here is the call graph for this function:

◆ initData()

ilNewsForContextBlockGUI::initData ( NewsCollection  $collection)
protected

Definition at line 118 of file class.ilNewsForContextBlockGUI.php.

118 : void
119 {
120 $this->collection = $collection;
121 $this->data = $collection->pluck('id', true);
122 }
pluck(string $key, bool $wrap=false)

References $collection, and ILIAS\News\Data\NewsCollection\pluck().

Referenced by loadNewsData(), and ilPDNewsBlockGUI\loadNewsData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilNewsForContextBlockGUI::initSettingsForm ( )

Init setting form.

Definition at line 752 of file class.ilNewsForContextBlockGUI.php.

752 : void
753 {
755 $ilCtrl = $this->ctrl;
756 $ilTabs = $this->tabs;
757
758 $ilTabs->clearTargets();
759
760 $news_set = new ilSetting("news");
761 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
762
763 $public = ilBlockSetting::_lookup(
764 $this->getBlockType(),
765 "public_notifications",
766 0,
767 (int) $this->block_id
768 );
769 $public_feed = ilBlockSetting::_lookup(
770 $this->getBlockType(),
771 "public_feed",
772 0,
773 (int) $this->block_id
774 );
775 $hide_block = ilBlockSetting::_lookup(
776 $this->getBlockType(),
777 "hide_news_block",
778 0,
779 (int) $this->block_id
780 );
781 $hide_news_per_date = ilBlockSetting::_lookup(
782 $this->getBlockType(),
783 "hide_news_per_date",
784 0,
785 (int) $this->block_id
786 );
787 $hide_news_date = ilBlockSetting::_lookup(
788 $this->getBlockType(),
789 "hide_news_date",
790 0,
791 (int) $this->block_id
792 );
793
794 if (is_string($hide_news_date) && $hide_news_date !== '') {
795 $hide_news_date = explode(" ", $hide_news_date);
796 }
797
798 $this->settings_form = new ilPropertyFormGUI();
799 $this->settings_form->setTitle($lng->txt("news_settings"));
800
801 // hide news block for learners
802 if ($this->getProperty("hide_news_block_option")) {
803 $ch = new ilCheckboxInputGUI(
804 $lng->txt("news_hide_news_block"),
805 "hide_news_block"
806 );
807 $ch->setInfo($lng->txt("news_hide_news_block_info"));
808 $ch->setChecked((bool) $hide_block);
809 $this->settings_form->addItem($ch);
810
811 $hnpd = new ilCheckboxInputGUI(
812 $lng->txt("news_hide_news_per_date"),
813 "hide_news_per_date"
814 );
815 $hnpd->setInfo($lng->txt("news_hide_news_per_date_info"));
816 $hnpd->setChecked((bool) $hide_news_per_date);
817
818 $dt_prop = new ilDateTimeInputGUI(
819 $lng->txt("news_hide_news_date"),
820 "hide_news_date"
821 );
822 $dt_prop->setRequired(true);
823 if (is_array($hide_news_date) && count($hide_news_date) === 2) {
824 $dt_prop->setDate(new ilDateTime($hide_news_date[0] . ' ' . $hide_news_date[1], IL_CAL_DATETIME));
825 }
826 $dt_prop->setShowTime(true);
827 $hnpd->addSubItem($dt_prop);
828
829 $this->settings_form->addItem($hnpd);
830 }
831
832 // default visibility
833 if ($enable_internal_rss && $this->getProperty("default_visibility_option")) {
834 $default_visibility = ilBlockSetting::_lookup(
835 $this->getBlockType(),
836 "default_visibility",
837 0,
838 (int) $this->block_id
839 );
840 if ($default_visibility == "") {
841 $default_visibility =
842 ilNewsItem::_getDefaultVisibilityForRefId($this->std_request->getRefId());
843 }
844
845 // Default Visibility
846 $radio_group = new ilRadioGroupInputGUI($lng->txt("news_default_visibility"), "default_visibility");
847 $radio_option = new ilRadioOption($lng->txt("news_visibility_users"), "users");
848 $radio_group->addOption($radio_option);
849 $radio_option = new ilRadioOption($lng->txt("news_visibility_public"), "public");
850 $radio_group->addOption($radio_option);
851 $radio_group->setInfo($lng->txt("news_news_item_visibility_info"));
852 $radio_group->setRequired(false);
853 $radio_group->setValue($default_visibility);
854 $this->settings_form->addItem($radio_group);
855 }
856
857 // public notifications
858 if ($enable_internal_rss && $this->getProperty("public_notifications_option")) {
859 $ch = new ilCheckboxInputGUI(
860 $lng->txt("news_notifications_public"),
861 "notifications_public"
862 );
863 $ch->setInfo($lng->txt("news_notifications_public_info"));
864 $ch->setChecked((bool) $public);
865 $this->settings_form->addItem($ch);
866 }
867
868 // extra rss feed
869 if ($enable_internal_rss) {
870 $ch = new ilCheckboxInputGUI(
871 $lng->txt("news_public_feed"),
872 "notifications_public_feed"
873 );
874 $ch->setInfo($lng->txt("news_public_feed_info"));
875 $ch->setChecked((bool) $public_feed);
876 $this->settings_form->addItem($ch);
877 }
878
879 $this->settings_form->addCommandButton("saveSettings", $lng->txt("save"));
880 $this->settings_form->addCommandButton("cancelSettings", $lng->txt("cancel"));
881 $this->settings_form->setFormAction($ilCtrl->getFormAction($this));
882 }
This class represents a date/time property in a property form.
This class represents a property form user interface.
clearTargets()
clear all targets

References ilBlockGUI\$ctrl, ilBlockGUI\$lng, $tabs, ilNewsItem\_getDefaultVisibilityForRefId(), ilBlockSetting\_lookup(), ilTabsGUI\clearTargets(), getBlockType(), ilBlockGUI\getProperty(), IL_CAL_DATETIME, and ilLanguage\txt().

Referenced by editSettings(), and saveSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRepositoryObject()

ilNewsForContextBlockGUI::isRepositoryObject ( )
protected

Returns whether block has a corresponding repository object.

Reimplemented from ilBlockGUI.

Definition at line 218 of file class.ilNewsForContextBlockGUI.php.

218 : bool
219 {
220 return false;
221 }

◆ loadNewsData()

ilNewsForContextBlockGUI::loadNewsData ( )
private

Reimplemented in ilPDNewsBlockGUI.

Definition at line 96 of file class.ilNewsForContextBlockGUI.php.

96 : void
97 {
98 if ($this->std_request->getRefId() === 0) {
99 $this->initData(new NewsCollection());
100 return;
101 }
102
103 $collection = $this->domain->collection()->getNewsForContainer(
104 $this->std_request->getRefId(),
105 $this->ctrl->getContextObjId(),
106 $this->ctrl->getContextObjType(),
107 new NewsCriteria(read_user_id: $this->user->getId()),
108 $this->user->getId(),
109 true
110 );
111
112 if ($this->ctrl->getContextObjType() !== 'frm') {
114 }
116 }
Optimized News Collection with memory-efficient data structures to support large news feeds.
groupForums(bool $group_posting_sequence)
News Criteria DTO for querying news items supports caching, JSON serialization, and validation.
initData(NewsCollection $collection)

References $collection, ILIAS\Repository\ctrl(), ILIAS\News\Data\NewsCollection\groupFiles(), ILIAS\News\Data\NewsCollection\groupForums(), initData(), and ILIAS\Repository\user().

Referenced by __construct(), hideNotifications(), and showNotifications().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ makeClickable()

ilNewsForContextBlockGUI::makeClickable ( string  $a_str)

Definition at line 681 of file class.ilNewsForContextBlockGUI.php.

681 : string
682 {
683 // this fixes bug 8744. We assume that strings that contain < and >
684 // already contain html, we do not handle these
685 if (is_int(strpos($a_str, ">")) && is_int(strpos($a_str, "<"))) {
686 return $a_str;
687 }
688
689 return ilUtil::makeClickable($a_str);
690 }
static makeClickable(string $a_text, bool $detectGotoLinks=false, ?string $ilias_http_path=null)

References ilUtil\makeClickable().

+ Here is the call graph for this function:

◆ preloadData()

ilNewsForContextBlockGUI::preloadData ( array  $data)
protected

Method will be called before rendering the block.

It lazily loads the required news items.

Reimplemented from ilBlockGUI.

Definition at line 127 of file class.ilNewsForContextBlockGUI.php.

127 : void
128 {
129 parent::preloadData($data);
130 $this->collection->load(array_column($data, 0));
131 }

References ilBlockGUI\$data.

◆ saveSettings()

ilNewsForContextBlockGUI::saveSettings ( )

Reimplemented in ilPDNewsBlockGUI.

Definition at line 952 of file class.ilNewsForContextBlockGUI.php.

952 : string
953 {
954 $ilCtrl = $this->ctrl;
955
956 $this->initSettingsForm();
957 $form = $this->settings_form;
958 if ($form->checkInput()) {
959 $news_set = new ilSetting("news");
960 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
961
962 if ($enable_internal_rss) {
964 $this->getBlockType(),
965 "public_notifications",
966 $form->getInput("notifications_public"),
967 0,
968 (int) $this->block_id
969 );
971 $this->getBlockType(),
972 "public_feed",
973 $form->getInput("notifications_public_feed"),
974 0,
975 (int) $this->block_id
976 );
978 $this->getBlockType(),
979 "default_visibility",
980 $form->getInput("default_visibility"),
981 0,
982 (int) $this->block_id
983 );
984 }
985
986 if ($this->getProperty("hide_news_block_option")) {
988 $this->getBlockType(),
989 "hide_news_block",
990 $form->getInput("hide_news_block"),
991 0,
992 (int) $this->block_id
993 );
995 $this->getBlockType(),
996 "hide_news_per_date",
997 $form->getInput("hide_news_per_date"),
998 0,
999 (int) $this->block_id
1000 );
1001
1002 // hide date
1003 $hd = $this->settings_form->getItemByPostVar("hide_news_date");
1004 $hide_date = $hd->getDate();
1005 if ($hide_date instanceof ilDateTime && $form->getInput("hide_news_per_date")) {
1007 $this->getBlockType(),
1008 "hide_news_date",
1009 $hide_date->get(IL_CAL_DATETIME),
1010 0,
1011 (int) $this->block_id
1012 );
1013 } else {
1015 $this->getBlockType(),
1016 "hide_news_date",
1017 "",
1018 0,
1019 (int) $this->block_id
1020 );
1021 }
1022 }
1023
1024 $this->domain->collection()->invalidateCache($this->user->getId());
1025
1026 $ilCtrl->returnToParent($this);
1027 } else {
1028 $this->settings_form->setValuesByPost();
1029 return $this->settings_form->getHTML();
1030 }
1031 return "";
1032 }

References ilBlockGUI\$ctrl, $settings_form, ilBlockSetting\_write(), getBlockType(), ilBlockGUI\getProperty(), IL_CAL_DATETIME, initSettingsForm(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ showFeedUrl()

ilNewsForContextBlockGUI::showFeedUrl ( )

Reimplemented in ilPDNewsBlockGUI.

Definition at line 1034 of file class.ilNewsForContextBlockGUI.php.

1034 : string
1035 {
1036 $lng = $this->lng;
1037 $ilUser = $this->user;
1038
1039 $title = ilObject::_lookupTitle((int) $this->block_id);
1040
1041 $tpl = new ilTemplate("tpl.show_feed_url.html", true, true, "components/ILIAS/News");
1043 "TXT_TITLE",
1044 sprintf($lng->txt("news_feed_url_for"), $title)
1045 );
1046 $tpl->setVariable("TXT_INFO", $lng->txt("news_get_feed_info"));
1047 $tpl->setVariable("TXT_FEED_URL", $lng->txt("news_feed_url"));
1049 "VAL_FEED_URL",
1050 ILIAS_HTTP_PATH . "/feed.php?client_id=" . rawurlencode(CLIENT_ID) . "&user_id=" . $ilUser->getId() .
1051 "&obj_id=" . $this->block_id .
1052 "&hash=" . ilObjUser::_lookupFeedHash($ilUser->getId(), true)
1053 );
1055 "VAL_FEED_URL_TXT",
1056 ILIAS_HTTP_PATH . "/feed.php?client_id=" . rawurlencode(CLIENT_ID) . "&<br />user_id=" . $ilUser->getId() .
1057 "&obj_id=" . $this->block_id .
1058 "&hash=" . ilObjUser::_lookupFeedHash($ilUser->getId(), true)
1059 );
1060
1061 $panel = $this->ui->factory()->panel()->standard(
1062 $lng->txt("news_internal_news"),
1063 $this->ui->factory()->legacy()->content($tpl->get())
1064 );
1065
1066 return $this->ui->renderer()->render($panel);
1067 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
ilTemplate $tpl
static _lookupFeedHash(int $a_user_id, bool $a_create=false)
get(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
Returns a block with all replacements done.

References ilBlockGUI\$lng, ilBlockGUI\$title, ilBlockGUI\$tpl, ilBlockGUI\$user, ilObjUser\_lookupFeedHash(), ilObject\_lookupTitle(), CLIENT_ID, ilTemplate\get(), HTML_Template_IT\setVariable(), ilLanguage\txt(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ showNotifications()

ilNewsForContextBlockGUI::showNotifications ( )

Definition at line 692 of file class.ilNewsForContextBlockGUI.php.

692 : void
693 {
694 $ilCtrl = $this->ctrl;
695 $ilUser = $this->user;
696
698 $this->getBlockType(),
699 "view",
700 "",
701 $ilUser->getId(),
702 (int) $this->block_id
703 );
704
705 // reload data
706 $this->loadNewsData();
707 $this->handleView();
708
709 if ($ilCtrl->isAsynch()) {
710 $this->send($this->getHTML());
711 }
712
713 $ilCtrl->returnToParent($this);
714 }

References ilBlockGUI\$ctrl, ilBlockGUI\$user, ilBlockSetting\_write(), getBlockType(), getHTML(), handleView(), loadNewsData(), and ilBlockGUI\send().

+ Here is the call graph for this function:

◆ writeSettings()

static ilNewsForContextBlockGUI::writeSettings ( array  $a_values)
static

Definition at line 935 of file class.ilNewsForContextBlockGUI.php.

935 : void
936 {
937 global $DIC;
938
939 $block_id = $DIC->ctrl()->getContextObjId();
940 foreach ($a_values as $key => $value) {
941 ilBlockSetting::_write(self::$block_type, (string) $key, (string) $value, 0, $block_id);
942 }
943 }

References ilBlockGUI\$block_id, $DIC, and ilBlockSetting\_write().

Referenced by ilContainerNewsSettingsGUI\save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $block_type

string ilNewsForContextBlockGUI::$block_type = "news"
static

◆ $collection

NewsCollection ilNewsForContextBlockGUI::$collection
protected

◆ $domain

InternalDomainService ilNewsForContextBlockGUI::$domain
protected

Definition at line 55 of file class.ilNewsForContextBlockGUI.php.

◆ $dynamic

bool ilNewsForContextBlockGUI::$dynamic = false
protected

Definition at line 42 of file class.ilNewsForContextBlockGUI.php.

◆ $gui

InternalGUIService ilNewsForContextBlockGUI::$gui
protected

Definition at line 56 of file class.ilNewsForContextBlockGUI.php.

◆ $help

ilHelpGUI ilNewsForContextBlockGUI::$help
protected

Definition at line 50 of file class.ilNewsForContextBlockGUI.php.

◆ $news_access

NewsAccess ilNewsForContextBlockGUI::$news_access
protected

Definition at line 41 of file class.ilNewsForContextBlockGUI.php.

◆ $prevent_initial_loading

bool ilNewsForContextBlockGUI::$prevent_initial_loading = false
protected

Definition at line 58 of file class.ilNewsForContextBlockGUI.php.

◆ $settings

ilSetting ilNewsForContextBlockGUI::$settings
protected

Definition at line 51 of file class.ilNewsForContextBlockGUI.php.

◆ $settings_form

ilPropertyFormGUI ilNewsForContextBlockGUI::$settings_form
protected

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

Referenced by saveSettings().

◆ $show_view_selection

bool ilNewsForContextBlockGUI::$show_view_selection
protected

Definition at line 43 of file class.ilNewsForContextBlockGUI.php.

◆ $std_request

StandardGUIRequest ilNewsForContextBlockGUI::$std_request
protected

Definition at line 54 of file class.ilNewsForContextBlockGUI.php.

Referenced by addToSettingsForm().

◆ $tabs

ilTabsGUI ilNewsForContextBlockGUI::$tabs
protected

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

Referenced by initSettingsForm().

◆ $view

string ilNewsForContextBlockGUI::$view
protected

Definition at line 48 of file class.ilNewsForContextBlockGUI.php.

◆ OBJECTS_WITH_NEWS_SUBTAB

const ilNewsForContextBlockGUI::OBJECTS_WITH_NEWS_SUBTAB = ["category", "course", "group", "forum"]

object type names with settings->news settings subtab

Definition at line 39 of file class.ilNewsForContextBlockGUI.php.


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