ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
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 35 of file class.ilNewsForContextBlockGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilNewsForContextBlockGUI::__construct ( )

Reimplemented from ilBlockGUI.

Reimplemented in ilPDNewsBlockGUI.

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

63 {
64 global $DIC;
65
67
68 $this->help = $DIC["ilHelp"];
69 $this->settings = $DIC->settings();
70 $this->tabs = $DIC->tabs();
71
72 $locator = $DIC->news()->internal();
73 $this->std_request = $locator->gui()->standardRequest();
74 $this->domain = $locator->domain();
75 $this->gui = $locator->gui();
76 $this->news_access = new NewsAccess($this->std_request->getRefId());
77
78 $this->lng->loadLanguageModule("news");
79 $DIC->help()->addHelpSection("news_block");
80
81 $this->setBlockId((string) $this->ctrl->getContextObjId());
82 $this->setLimit(5);
83 $this->setEnableNumInfo(true);
84
85 if (!$this->prevent_initial_loading) {
86 $this->loadNewsData();
87 }
88
89 $this->setTitle($this->lng->txt("news_internal_news"));
90 $this->setRowTemplate("tpl.block_row_news_for_context.html", "components/ILIAS/News");
91 $this->allow_moving = false;
92 $this->handleView();
93
94 $this->setPresentation(self::PRES_SEC_LIST);
95 }
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 886 of file class.ilNewsForContextBlockGUI.php.

886 : void
887 {
888 global $DIC;
889
890 $std_request = $DIC->news()
891 ->internal()
892 ->gui()
893 ->standardRequest();
894
895 $lng = $DIC->language();
896 $block_id = $DIC->ctrl()->getContextObjId();
897
898 $news_set = new ilSetting("news");
899 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
900
901 $public_feed = ilBlockSetting::_lookup(
902 self::$block_type,
903 "public_feed",
904 0,
906 );
907 $default_visibility = ilBlockSetting::_lookup(self::$block_type, "default_visibility", 0, $block_id);
908 if ($default_visibility == "") {
909 $default_visibility =
911 }
912 $radio_group = new ilRadioGroupInputGUI($lng->txt("news_default_visibility"), "default_visibility");
913 $radio_option = new ilRadioOption($lng->txt("news_visibility_users"), "users");
914 $radio_group->addOption($radio_option);
915 $radio_option = new ilRadioOption($lng->txt("news_visibility_public"), "public");
916 $radio_group->addOption($radio_option);
917 $radio_group->setInfo($lng->txt("news_news_item_visibility_info"));
918 $radio_group->setRequired(false);
919 $radio_group->setValue($default_visibility);
920 $a_input->addSubItem($radio_group);
921
922 // extra rss feed
923 if ($enable_internal_rss) {
924 $radio_rss = new ilCheckboxInputGUI(
925 $lng->txt("news_public_feed"),
926 "notifications_public_feed"
927 );
928 $radio_rss->setInfo($lng->txt("news_public_feed_info"));
929 $radio_rss->setChecked((bool) $public_feed);
930 $a_input->addSubItem($radio_rss);
931 }
932 }
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 944 of file class.ilNewsForContextBlockGUI.php.

944 : void
945 {
946 $ilCtrl = $this->ctrl;
947
948 $ilCtrl->returnToParent($this);
949 }
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 1118 of file class.ilNewsForContextBlockGUI.php.

1118 : void
1119 {
1120 $ilCtrl = $this->ctrl;
1121 $ilUser = $this->user;
1122
1123 ilSession::set("il_feed_js", "n");
1124 $ilUser->writePref("il_feed_js", "n");
1125 $ilCtrl->returnToParent($this);
1126 }
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 1141 of file class.ilNewsForContextBlockGUI.php.

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

◆ editSettings()

ilNewsForContextBlockGUI::editSettings ( )

Show settings screen.

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

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

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 1128 of file class.ilNewsForContextBlockGUI.php.

1128 : void
1129 {
1130 $ilUser = $this->user;
1131 ilSession::set("il_feed_js", "y");
1132 $ilUser->writePref("il_feed_js", "y");
1133 $this->send($this->getHTML());
1134 }
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 246 of file class.ilNewsForContextBlockGUI.php.

247 {
248 if (strcasecmp($this->ctrl->getNextClass(), ilNewsItemGUI::class) === 0) {
249 $news_item_gui = new ilNewsItemGUI();
250 $news_item_gui->setEnableEdit($this->getEnableEdit());
251 return $this->ctrl->forwardCommand($news_item_gui);
252 }
253
254 $cmd = $this->ctrl->getCmd("getHTML");
255 return $this->$cmd();
256 }
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 212 of file class.ilNewsForContextBlockGUI.php.

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

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 1068 of file class.ilNewsForContextBlockGUI.php.

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

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

1097 : string
1098 {
1099 $ilCtrl = $this->ctrl;
1100
1101 $ilCtrl->setParameterByClass(
1102 ilColumnGUI::class,
1103 "block_id",
1104 "block_" . $this->getBlockType() . "_" . $this->getBlockId()
1105 );
1106 //echo "hh";
1107 $rel_tpl = new ilTemplate("tpl.js_enabler.html", true, true, "components/ILIAS/News");
1108 $rel_tpl->setVariable("BLOCK_ID", "block_" . $this->getBlockType() . "_" . $this->getBlockId());
1109 $rel_tpl->setVariable(
1110 "TARGET",
1111 $ilCtrl->getLinkTarget($this, "enableJS", "", true, false)
1112 );
1113
1114 return $rel_tpl->get();
1115 }
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 132 of file class.ilNewsForContextBlockGUI.php.

133 {
134 try {
135 $info = $this->getNewsForId($data[0]);
136 } catch (\Exception $e) {
137 $this->logger->error($e->getMessage());
138 return $this->ui->factory()->item()->standard($this->lng->txt('news_not_available'))
139 ->withDescription($this->lng->txt('news_sorry_not_accessible_anymore'));
140 }
141
142
143 $props = [
144 $this->lng->txt('date') => $info['creation_date'] ?? ''
145 ];
146
147 $item = $this->ui->factory()->item()->standard(
148 $this->ui->factory()->link()->standard($info['news_title'] ?? '', $info['url'] ?? '')
149 )->withProperties($props);
150
151 if ($info['ref_id'] > 0) {
152 $item = $item->withDescription($info['type_txt'] . ': ' . $info['obj_title']);
153 }
154 return $item;
155 }
$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 670 of file class.ilNewsForContextBlockGUI.php.

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

◆ getNewsForId()

ilNewsForContextBlockGUI::getNewsForId ( int  $news_id)
private

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

157 : array
158 {
159 $item = $this->collection->getById($news_id);
160 if ($item === null) {
161 throw new \InvalidArgumentException("News item with id {$news_id} not found.");
162 }
163
164 $grouping = $this->collection->getGroupingFor($item);
165
166 $creation_date = new ilDateTime($item->getCreationDate()->format('c'), IL_CAL_DATETIME);
169 $item->getContextObjType(),
170 $item->getTitle(),
171 $item->isContentIsLangVar(),
172 $grouping ? $grouping['agg_ref_id'] : 0,
173 $grouping ? $grouping['aggregation'] : [],
174 )
175 );
176
177 $info = [
178 'ref_id' => $item->getContextRefId(),
179 'creation_date' => ilDatePresentation::formatDate($creation_date),
180 'news_title' => $title,
181 ];
182
183 // title image type
184 if ($item->getContextRefId() > 0) {
185 $obj_id = $item->getContextObjId();
186 $type = $item->getContextObjType();
187
188 $lang_type = in_array($type, ['sahs', 'lm', 'htlm']) ? 'lres' : 'obj_' . $type;
189
190 $type_txt = ($this->obj_def->isPlugin($item->getContextObjType()))
191 ? ilObjectPlugin::lookupTxtById($item->getContextObjType(), $lang_type)
192 : $this->lng->txt($lang_type);
193
194 $info['type_txt'] = $type_txt;
195 $info['type_icon'] = ilObject::_getIcon($obj_id, 'tiny', $type);
196 $info['obj_title'] = ilStr::shortenWords(ilObject::_lookupTitle($obj_id));
197 $info['user_read'] = $this->collection->isReadByUser($this->user->getId(), $news_id);
198
199 $this->ctrl->setParameter($this, 'news_context', $item->getContextRefId());
200 } else {
201 $this->ctrl->setParameter($this, 'news_context', '');
202 }
203
204 $this->ctrl->setParameter($this, 'news_id', $item->getId());
205 $info['url'] = $this->ctrl->getLinkTarget($this, 'showNews');
206 $this->ctrl->clearParameters($this);
207
208 return $info;
209 }
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 1136 of file class.ilNewsForContextBlockGUI.php.

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

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getOverview()

ilNewsForContextBlockGUI::getOverview ( )

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

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

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 222 of file class.ilNewsForContextBlockGUI.php.

222 : string
223 {
224 global $DIC;
225
226 $ilCtrl = $DIC->ctrl();
227
228 if (strcasecmp($ilCtrl->getCmdClass(), ilNewsItemGUI::class) === 0) {
229 return IL_SCREEN_FULL;
230 }
231
232 switch ($ilCtrl->getCmd()) {
233 case "showNews":
234 case "showFeedUrl":
235 return IL_SCREEN_CENTER;
236
237 case "editSettings":
238 case "saveSettings":
239 return IL_SCREEN_FULL;
240
241 default:
242 return IL_SCREEN_SIDE;
243 }
244 }
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 373 of file class.ilNewsForContextBlockGUI.php.

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

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

+ Here is the caller graph for this function:

◆ hideNotifications()

ilNewsForContextBlockGUI::hideNotifications ( )

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

715 : void
716 {
717 $ilCtrl = $this->ctrl;
718 $ilUser = $this->user;
719
721 $this->getBlockType(),
722 "view",
723 "hide_notifications",
724 $ilUser->getId(),
725 (int) $this->block_id
726 );
727
728 // reload data
729 $this->loadNewsData();
730 $this->handleView();
731
732 if ($ilCtrl->isAsynch()) {
733 $this->send($this->getHTML());
734 }
735
736 $ilCtrl->returnToParent($this);
737 }
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 117 of file class.ilNewsForContextBlockGUI.php.

117 : void
118 {
119 $this->collection = $collection;
120 $this->data = $collection->pluck('id', true);
121 }
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 751 of file class.ilNewsForContextBlockGUI.php.

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

217 : bool
218 {
219 return false;
220 }

◆ loadNewsData()

ilNewsForContextBlockGUI::loadNewsData ( )
private

Reimplemented in ilPDNewsBlockGUI.

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

97 : void
98 {
99 if ($this->std_request->getRefId() === 0) {
100 $this->initData(new NewsCollection());
101 return;
102 }
103
104 $collection = $this->domain->collection()->getNewsForContext(
105 new NewsContext($this->std_request->getRefId(), $this->ctrl->getContextObjId(), $this->ctrl->getContextObjType()),
106 new NewsCriteria(read_user_id: $this->user->getId()),
107 $this->user->getId(),
108 true
109 );
110
111 if ($this->ctrl->getContextObjType() !== 'frm') {
113 }
115 }
Optimized News Collection with memory-efficient data structures to support large news feeds.
getNewsForContext(int $context_obj_id, string $context_obj_type)
groupForums(bool $group_posting_sequence)
News Context DTO represents a context where news items can be associated with.
Definition: NewsContext.php:29
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\getNewsForContext(), 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 680 of file class.ilNewsForContextBlockGUI.php.

680 : string
681 {
682 // this fixes bug 8744. We assume that strings that contain < and >
683 // already contain html, we do not handle these
684 if (is_int(strpos($a_str, ">")) && is_int(strpos($a_str, "<"))) {
685 return $a_str;
686 }
687
688 return ilUtil::makeClickable($a_str);
689 }
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 126 of file class.ilNewsForContextBlockGUI.php.

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

References ilBlockGUI\$data.

◆ saveSettings()

ilNewsForContextBlockGUI::saveSettings ( )

Reimplemented in ilPDNewsBlockGUI.

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

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

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 1033 of file class.ilNewsForContextBlockGUI.php.

1033 : string
1034 {
1035 $lng = $this->lng;
1036 $ilUser = $this->user;
1037
1038 $title = ilObject::_lookupTitle((int) $this->block_id);
1039
1040 $tpl = new ilTemplate("tpl.show_feed_url.html", true, true, "components/ILIAS/News");
1042 "TXT_TITLE",
1043 sprintf($lng->txt("news_feed_url_for"), $title)
1044 );
1045 $tpl->setVariable("TXT_INFO", $lng->txt("news_get_feed_info"));
1046 $tpl->setVariable("TXT_FEED_URL", $lng->txt("news_feed_url"));
1048 "VAL_FEED_URL",
1049 ILIAS_HTTP_PATH . "/feed.php?client_id=" . rawurlencode(CLIENT_ID) . "&user_id=" . $ilUser->getId() .
1050 "&obj_id=" . $this->block_id .
1051 "&hash=" . ilObjUser::_lookupFeedHash($ilUser->getId(), true)
1052 );
1054 "VAL_FEED_URL_TXT",
1055 ILIAS_HTTP_PATH . "/feed.php?client_id=" . rawurlencode(CLIENT_ID) . "&<br />user_id=" . $ilUser->getId() .
1056 "&obj_id=" . $this->block_id .
1057 "&hash=" . ilObjUser::_lookupFeedHash($ilUser->getId(), true)
1058 );
1059
1060 $panel = $this->ui->factory()->panel()->standard(
1061 $lng->txt("news_internal_news"),
1062 $this->ui->factory()->legacy()->content($tpl->get())
1063 );
1064
1065 return $this->ui->renderer()->render($panel);
1066 }
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 691 of file class.ilNewsForContextBlockGUI.php.

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

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 934 of file class.ilNewsForContextBlockGUI.php.

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

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 56 of file class.ilNewsForContextBlockGUI.php.

◆ $dynamic

bool ilNewsForContextBlockGUI::$dynamic = false
protected

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

◆ $gui

InternalGUIService ilNewsForContextBlockGUI::$gui
protected

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

◆ $help

ilHelpGUI ilNewsForContextBlockGUI::$help
protected

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

◆ $news_access

NewsAccess ilNewsForContextBlockGUI::$news_access
protected

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

◆ $prevent_initial_loading

bool ilNewsForContextBlockGUI::$prevent_initial_loading = false
protected

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

◆ $settings

ilSetting ilNewsForContextBlockGUI::$settings
protected

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

◆ $settings_form

ilPropertyFormGUI ilNewsForContextBlockGUI::$settings_form
protected

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

Referenced by saveSettings().

◆ $show_view_selection

bool ilNewsForContextBlockGUI::$show_view_selection
protected

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

◆ $std_request

StandardGUIRequest ilNewsForContextBlockGUI::$std_request
protected

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

Referenced by addToSettingsForm().

◆ $tabs

ilTabsGUI ilNewsForContextBlockGUI::$tabs
protected

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

Referenced by initSettingsForm().

◆ $view

string ilNewsForContextBlockGUI::$view
protected

Definition at line 49 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 40 of file class.ilNewsForContextBlockGUI.php.


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