ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilBlogPostingGUI Class Reference

Class ilBlogPosting GUI class. More...

+ Inheritance diagram for ilBlogPostingGUI:
+ Collaboration diagram for ilBlogPostingGUI:

Public Member Functions

 __construct (int $a_node_id, ?object $a_access_handler=null, int $a_id=0, int $a_old_nr=0, bool $a_enable_public_notes=true, bool $a_may_contribute=true, int $a_style_sheet_id=0)
 
 executeCommand ()
 execute command More...
 
 setBlogPosting (ilBlogPosting $a_posting)
 
 preview (?string $a_mode=null)
 
 previewFullscreen ()
 Needed for portfolio/blog handling. More...
 
 showPage (string $a_title="")
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 getTabs (string $a_activate="")
 
 deleteBlogPostingConfirmationScreen ()
 
 cancelBlogPostingDeletion ()
 
 confirmBlogPostingDeletion ()
 
 editTitle (?ilPropertyFormGUI $a_form=null)
 
 updateTitle ()
 
 initTitleForm ()
 
 editDate (?ilPropertyFormGUI $a_form=null)
 
 updateDate ()
 
 initDateForm ()
 
 observeNoteAction (int $a_blog_id, int $a_posting_id, string $a_type, string $a_action, int $a_note_id)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 deactivatePageToList ()
 
 deactivatePage (bool $a_to_list=false)
 
 activatePageToList ()
 
 activatePage (bool $a_to_list=false)
 
 editKeywords ()
 Diplay the keywords form. More...
 
 saveKeywordsForm ()
 
 getDisabledText ()
 
 getCommentsHTMLExport ()
 
 finishEditing ()
 
- Public Member Functions inherited from ilPageObjectGUI
 __construct (string $a_parent_type, int $a_id, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="", string $concrete_lang="")
 
 setTemplate (ilGlobalTemplateInterface $main_tpl)
 
 afterConstructor ()
 
 setAdvMdRecordObject (int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 setParentType (string $a_val)
 
 getParentType ()
 
 setId (int $a_val)
 
 getId ()
 
 setOldNr (int $a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 
 setLanguage (string $a_val)
 
 getLanguage ()
 
 setEnablePCType (string $a_pc_type, bool $a_val)
 
 getEnablePCType (string $a_pc_type)
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setPageObject (ilPageObject $a_pg_obj)
 
 getPageObject ()
 
 setOutputMode (string $a_mode=self::PRESENTATION)
 
 getOutputMode ()
 
 setTemplateOutput (bool $a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle (string $a_title="")
 
 getPresentationTitle ()
 
 setHeader (string $a_title="")
 
 getHeader ()
 
 setLinkParams (string $l_params="")
 
 getLinkParams ()
 
 setLinkFrame (string $l_frame="")
 
 getLinkFrame ()
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 getLinkXML ()
 
 setQuestionHTML (array $question_html)
 
 getQuestionHTML ()
 
 setTemplateTargetVar (string $a_variable)
 
 getTemplateTargetVar ()
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 setTabs (ilTabsGUI $a_tabs)
 
 setPageBackTitle (string $a_title)
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn (string $a_return)
 
 enableNotes (bool $a_enabled, int $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setViewPageLink (string $a_link, string $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 
 getViewPageTarget ()
 
 getViewPageText ()
 
 setActivationListener (object $a_obj, string $a_meth)
 
 setEnabledNews (bool $a_enabled, int $a_news_obj_id=0, string $a_news_obj_type="")
 
 getEnabledNews ()
 
 setTabHook (object $a_object, string $a_function)
 
 setEditPreview (bool $a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 
 setEnabledTabs (bool $a_enabledtabs)
 
 getEnabledTabs ()
 
 setEnabledPageFocus (bool $a_enabledpagefocus)
 
 setOpenPlaceHolder (string $a_val)
 
 getOpenPlaceHolder ()
 
 getEnabledPageFocus ()
 
 setPrependingHtml (string $a_prependinghtml)
 
 getPrependingHtml ()
 
 setEnableEditing (bool $a_enableediting)
 
 getEnableEditing ()
 
 setRawPageContent (bool $a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 setCompareMode (bool $a_val)
 
 getCompareMode ()
 
 setAbstractOnly (bool $a_val, string $pcid="")
 Get only abstract (first text paragraph) More...
 
 getAbstractOnly ()
 
 setRenderPageContainer (bool $a_val)
 
 getRenderPageContainer ()
 
 getDisabledText ()
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 activateMetaDataEditor (ilObject $a_rep_obj, string $a_type, int $a_sub_obj_id, ?object $a_observer_obj=null, string $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 
 determineFullscreenLink ()
 
 determineSourcecodeDownloadScript ()
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs (string $a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets (string $output)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 
 setLinkXml (string $xml)
 
 getProfileBackUrl ()
 
 setProfileBackUrl (string $url)
 
 downloadFile ()
 
 displayMediaFullscreen ()
 
 displayMedia (bool $a_fullscreen=false)
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc (string $a_output)
 
 insertResources (string $a_output)
 
 insertAdvTrigger (string $a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 
 edit ()
 
 getBlockingInfoMessage ()
 
 insertJSAtPlaceholder ()
 
 presentation (string $a_mode=self::PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen (int $a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 
 getMetaDataLink ()
 
 getTabs (string $a_activate="")
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags (string $a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 getNotesHTML (?object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, ?callable $a_callback=null, bool $export=false)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 
 saveInitialOpenedContent ()
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 
 finishEditing ()
 
 getPagePermaLink ()
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 
 afterDeleteContents ()
 

Static Public Member Functions

static getSnippet (int $a_id, bool $a_truncate=false, int $a_truncate_length=500, string $a_truncate_sign="...", bool $a_include_picture=false, int $a_picture_width=144, int $a_picture_height=144, ?string $a_export_directory=null)
 Get first text paragraph of page. More...
 
- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu (string $a_par_type, bool $a_int_links=false, bool $a_wiki_links=false, bool $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false, ?\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper=null)
 Get Tiny Menu. More...
 

Data Fields

bool $add_date = false
 
- Data Fields inherited from ilPageObjectGUI
const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
string $page_back_title = ""
 
ilPageObject $obj
 
string $presentation_title = ""
 
string $target_script = ""
 
string $return_location = ""
 
string $target_var = ""
 
string $template_output_var = ""
 
bool $output2template = false
 
string $link_params = ""
 
string $sourcecode_download_script = ""
 
bool $activation = false
 
bool $activated = true
 
bool $editpreview = false
 
bool $use_meta_data = false
 
ilObject $meta_data_rep_obj = null
 
int $meta_data_sub_obj_id = 0
 
string $meta_data_type = ""
 
object $meta_data_observer_obj = null
 
string $meta_data_observer_func = ""
 
bool $link_xml_set = false
 
bool $enableediting = true
 
bool $rawpagecontent = false
 
bool $enabledcontentincludes = false
 
bool $compare_mode = false
 
ilPageConfig $page_config = null
 
bool $tabs_enabled = true
 
bool $render_page_container = false
 
string $pl_start = "{{{{{"
 
string $pl_end = "}}}}}"
 

Protected Member Functions

 checkAccess (string $a_cmd)
 
 isInWorkspace ()
 Is current page part of personal workspace blog? More...
 
 showPageHeading ()
 
 getPageHeading ()
 Get page heading see also https://docu.ilias.de/goto_docu_wiki_wpage_5793_1357.html the presentation heading has a defined layout, title is not from page content. More...
 
 cancelEdit ()
 
 initKeywordsForm ()
 
 getParentObjId ()
 
 getFirstMediaObjectAsTag (int $a_width=144, int $a_height=144, ?string $a_export_directory=null)
 
 showEditToolbar ()
 Show edit toolbar. More...
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 setBackToHistoryTabs ()
 
 checkLangPageAvailable (int $id, string $lang)
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Static Protected Member Functions

static parseImage (int $src_width, int $src_height, int $tgt_width, int $tgt_height)
 

Protected Attributes

InternalDomainService $domain
 
InternalGUIService $blog_gui
 
ProfileGUI $profile_gui
 
ILIAS Notes Service $notes
 
ReadingTimeManager $reading_time_manager
 
StandardGUIRequest $blog_request
 
ilTabsGUI $tabs
 
ilLocatorGUI $locator
 
ilSetting $settings
 
LOMServices $lom_services
 
int $node_id
 
PostingManager $posting_manager
 
object $access_handler = null
 
bool $enable_public_notes = false
 
bool $may_contribute = false
 
bool $fetchall = false
 
int $blpg = 0
 
string $term = ""
 
- Protected Attributes inherited from ilPageObjectGUI
ILIAS TestQuestionPool Questions PublicInterface $questioninfo
 
ILIAS COPage Page PageManager $pm
 
ILIAS COPage Link LinkManager $link
 
ILIAS COPage InternalGUIService $gui
 
ILIAS COPage PC PCDefinition $pc_definition
 
ILIAS COPage Xsl XslManager $xsl
 
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS Notes Service $notes
 
int $requested_ref_id
 
int $requested_pg_id
 
string $requested_file_id
 
string $requested_transl
 
int $requested_old_nr
 
EditGUIRequest $request
 
EditSessionRepository $edit_repo
 
string $exp_target_script = ""
 
string $exp_id = ""
 
string $exp_frame = ""
 
string $act_meth = ""
 
object $act_obj
 
int $notes_parent_id = 0
 
ilPropertyFormGUI $form
 
int $styleid = 0
 
bool $enabledpagefocus
 
string $link_xml
 
int $old_nr = 0
 
int $id
 
string $language
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilAccessHandler $access
 
ilLogger $log
 
ilObjUser $user
 
ilHelpGUI $help
 
string $output_mode = ""
 
string $parent_type = ""
 
string $file_download_link = ''
 
string $fullscreen_link = ''
 
string $link_frame = ''
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
ILIAS COPage PageLinker $page_linker
 
string $abstract_pcid = ""
 
ilToolbarGUI $toolbar
 
string $open_place_holder = ""
 
int $requested_user_id = 0
 
int $requested_q_id = 0
 
int $requested_history_mode = 0
 
bool $enabled_news = false
 
int $news_obj_id = 0
 
string $news_obj_type = ""
 
array $tab_hook = null
 
string $view_page_link = ""
 
string $view_page_target = ""
 
string $offline_directory = ""
 
bool $notes_enabled = false
 
string $prependinghtml = ""
 
string $header = ""
 
string $int_link_return = ""
 
bool $enabled_href = true
 
int $adv_ref_id = null
 
string $adv_type = null
 
string $adv_subtype = null
 
string $concrete_lang = ""
 
string $profile_back_url = ""
 
ilComponentFactory $component_factory
 
ILIAS COPage Compare PageCompare $compare
 

Detailed Description

Class ilBlogPosting GUI class.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om @ilCtrl_Calls ilBlogPostingGUI: ilPageEditorGUI, ilEditClipboardGUI @ilCtrl_Calls ilBlogPostingGUI: ilRatingGUI, ILIAS\User\Profile\PublicProfileGUI, ilPageObjectGUI, ilCommentGUI

Definition at line 35 of file class.ilBlogPostingGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilBlogPostingGUI::__construct ( int  $a_node_id,
?object  $a_access_handler = null,
int  $a_id = 0,
int  $a_old_nr = 0,
bool  $a_enable_public_notes = true,
bool  $a_may_contribute = true,
int  $a_style_sheet_id = 0 
)

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

65 {
66 global $DIC;
67
68 $service = $DIC->blog()->internal();
69 $this->domain = $service->domain();
70 $this->blog_gui = $DIC->blog()->internal()->gui();
71
72 $this->tabs = $this->blog_gui->tabs();
73 $this->locator = $this->blog_gui->locator();
74 $this->settings = $this->domain->settings();
75 $this->user = $this->domain->user();
76 $tpl = $this->blog_gui->ui()->mainTemplate();
77 $lng = $this->domain->lng();
78 $this->blog_request = $this->blog_gui->standardRequest();
79 $this->lom_services = $DIC->learningObjectMetadata();
80
81 $lng->loadLanguageModule("blog");
82
83 $this->node_id = $a_node_id;
84 $this->access_handler = $a_access_handler;
85 $this->enable_public_notes = $a_enable_public_notes;
86
87 parent::__construct("blp", $a_id, $a_old_nr);
88
89 // needed for notification
90 $this->getBlogPosting()->setBlogNodeId($this->node_id, $this->isInWorkspace());
91 $this->getBlogPosting()->getPageConfig()->setEditLockSupport(!$this->isInWorkspace());
92
93 // #11151
94 $this->may_contribute = $a_may_contribute;
95 $this->setEnableEditing($a_may_contribute);
96
97 // content style
98
99 $tpl->setCurrentBlock("SyntaxStyle");
101 "LOCATION_SYNTAX_STYLESHEET",
103 );
105
106 // needed for editor
107 $this->setStyleId($a_style_sheet_id);
108
109 $this->blpg = $this->blog_request->getBlogPage();
110 $this->fetchall = $this->blog_request->getFetchAll();
111 $this->term = $this->blog_request->getTerm();
112
113 $this->reading_time_manager = new ReadingTimeManager();
114 $this->notes = $DIC->notes();
115 $this->profile_gui = $DIC->blog()->internal()->gui()->profile();
116 $this->posting_manager = $DIC->blog()->internal()->domain()->posting();
117 }
isInWorkspace()
Is current page part of personal workspace blog?
loadLanguageModule(string $a_module)
Load language module.
setStyleId(int $a_styleid)
ilGlobalTemplateInterface $tpl
setEnableEditing(bool $a_enableediting)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
$service
Definition: ltiresult.php:36
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ilPageObjectGUI\$lng, $service, ilPageObjectGUI\$tpl, ILIAS\GlobalScreen\Provider\__construct(), ilObjStyleSheet\getSyntaxStylePath(), isInWorkspace(), ilLanguage\loadLanguageModule(), ILIAS\Repository\locator(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ilPageObjectGUI\setEnableEditing(), ilPageObjectGUI\setStyleId(), ILIAS\Repository\settings(), ILIAS\UICore\GlobalTemplate\setVariable(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ activatePage()

ilBlogPostingGUI::activatePage ( bool  $a_to_list = false)

Definition at line 609 of file class.ilBlogPostingGUI.php.

609 : void
610 {
611 // send notifications
612 ilObjBlog::sendNotification("new", $this->isInWorkspace(), $this->node_id, $this->getBlogPosting()->getId());
613
614 if ($this->checkAccess("write") || $this->checkAccess("contribute")) {
615 $this->getBlogPosting()->setActive(true);
616 $this->getBlogPosting()->update(true, false);
617 }
618 if (!$a_to_list) {
619 $this->ctrl->redirect($this, "edit");
620 } else {
621 $this->ctrl->setParameterByClass("ilobjbloggui", "blpg", "");
622 $this->ctrl->redirectByClass("ilobjbloggui", "");
623 }
624 }
static sendNotification(string $a_action, bool $a_in_wsp, int $a_blog_node_id, int $a_posting_id, ?string $a_comment=null)

References ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), and ilObjBlog\sendNotification().

+ Here is the call graph for this function:

◆ activatePageToList()

ilBlogPostingGUI::activatePageToList ( )

Definition at line 604 of file class.ilBlogPostingGUI.php.

604 : void
605 {
606 $this->activatePage(true);
607 }

◆ cancelBlogPostingDeletion()

ilBlogPostingGUI::cancelBlogPostingDeletion ( )

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

406 : void
407 {
408 $ilCtrl = $this->ctrl;
409
410 $ilCtrl->setParameterByClass("ilobjbloggui", "blpg", ""); // #14363
411 $ilCtrl->redirectByClass("ilobjbloggui", "render");
412 }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc

◆ cancelEdit()

ilBlogPostingGUI::cancelEdit ( )
protected

Definition at line 559 of file class.ilBlogPostingGUI.php.

559 : void
560 {
561 $this->ctrl->redirectByClass("ilObjBlogGUI", "");
562 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ checkAccess()

ilBlogPostingGUI::checkAccess ( string  $a_cmd)
protected

Definition at line 171 of file class.ilBlogPostingGUI.php.

171 : bool
172 {
173 if ($a_cmd === "contribute") {
175 }
176 return $this->access_handler->checkAccess($a_cmd, "", $this->node_id);
177 }

References $may_contribute.

◆ confirmBlogPostingDeletion()

ilBlogPostingGUI::confirmBlogPostingDeletion ( )

Definition at line 414 of file class.ilBlogPostingGUI.php.

414 : void
415 {
416 $ilCtrl = $this->ctrl;
418
419 if ($this->checkAccess("write") || $this->checkAccess("contribute")) {
420 // delete all md keywords
421 $this->lom_services->deleteAll(
422 $this->getBlogPosting()->getBlogId(),
423 $this->getBlogPosting()->getId(),
424 "blp"
425 );
426
427 $this->getBlogPosting()->delete();
428 $this->tpl->setOnScreenMessage('success', $lng->txt("blog_posting_deleted"), true);
429 }
430
431 $ilCtrl->setParameterByClass("ilobjbloggui", "blpg", ""); // #14363
432 $ilCtrl->redirectByClass("ilobjbloggui", "render");
433 }
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...

References $lng, and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ deactivatePage()

ilBlogPostingGUI::deactivatePage ( bool  $a_to_list = false)

Definition at line 590 of file class.ilBlogPostingGUI.php.

590 : void
591 {
592 if ($this->checkAccess("write") || $this->checkAccess("contribute")) {
593 $this->getBlogPosting()->unpublish();
594 }
595
596 if (!$a_to_list) {
597 $this->ctrl->redirect($this, "edit");
598 } else {
599 $this->ctrl->setParameterByClass("ilobjbloggui", "blpg", "");
600 $this->ctrl->redirectByClass("ilobjbloggui", "");
601 }
602 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ deactivatePageToList()

ilBlogPostingGUI::deactivatePageToList ( )

Definition at line 585 of file class.ilBlogPostingGUI.php.

585 : void
586 {
587 $this->deactivatePage(true);
588 }

◆ deleteBlogPostingConfirmationScreen()

ilBlogPostingGUI::deleteBlogPostingConfirmationScreen ( )

Definition at line 366 of file class.ilBlogPostingGUI.php.

366 : void
367 {
369 $ilCtrl = $this->ctrl;
371
372 if ($this->checkAccess("write") || $this->checkAccess("contribute")) {
373 $confirmation_gui = new ilConfirmationGUI();
374 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
375 $confirmation_gui->setHeaderText($lng->txt("blog_posting_deletion_confirmation"));
376 $confirmation_gui->setCancel($lng->txt("cancel"), "cancelBlogPostingDeletion");
377 $confirmation_gui->setConfirm($lng->txt("delete"), "confirmBlogPostingDeletion");
378
379 $dtpl = new ilTemplate(
380 "tpl.blog_posting_deletion_confirmation.html",
381 true,
382 true,
383 "components/ILIAS/Blog"
384 );
385
386 $dtpl->setVariable("PAGE_TITLE", $this->getBlogPosting()->getTitle());
387
388 // notes/comments
389 $cnt_note_users = $this->notes->domain()->getUserCount(
390 $this->getBlogPosting()->getParentId(),
391 $this->getBlogPosting()->getId(),
392 "wpg"
393 );
394 $dtpl->setVariable(
395 "TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
396 $lng->txt("blog_number_users_notes_or_comments")
397 );
398 $dtpl->setVariable("TXT_NR_NOTES_COMMENTS", $cnt_note_users);
399
400 $confirmation_gui->addItem("", "", $dtpl->get());
401
402 $tpl->setContent($confirmation_gui->getHTML());
403 }
404 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
setContent(string $a_html)
Sets content for standard template.

References $lng, ILIAS\Survey\Mode\getId(), and ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle().

+ Here is the call graph for this function:

◆ editDate()

ilBlogPostingGUI::editDate ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 495 of file class.ilBlogPostingGUI.php.

495 : void
496 {
498 $ilTabs = $this->tabs;
499
500 $ilTabs->clearTargets();
501 $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("ilobjblogGUI"));
502
503 $ilTabs->activateTab("edit");
504
505 if (!$a_form) {
506 $a_form = $this->initDateForm();
507 }
508
509 $tpl->setContent($a_form->getHTML());
510 }
clearTargets()
clear all targets

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ editKeywords()

ilBlogPostingGUI::editKeywords ( )

Diplay the keywords form.

Definition at line 629 of file class.ilBlogPostingGUI.php.

629 : void
630 {
631 global $DIC;
632
633 $renderer = $DIC->ui()->renderer();
634
635 $ilTabs = $this->tabs;
637
638 $ilTabs->clearTargets();
639 $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("ilobjblogGUI"));
640
641 if (!$this->checkAccess("contribute")) {
642 return;
643 }
644
645 $ilTabs->activateTab("pg");
646
647 $tpl->setContent($renderer->render($this->initKeywordsForm()));
648 }
$renderer

References $DIC, $renderer, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ editTitle()

ilBlogPostingGUI::editTitle ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 435 of file class.ilBlogPostingGUI.php.

435 : void
436 {
438 $ilTabs = $this->tabs;
439
440 $ilTabs->clearTargets();
441 $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("ilobjblogGUI"));
442
443 $ilTabs->activateTab("edit");
444
445 if (!$a_form) {
446 $a_form = $this->initTitleForm();
447 }
448
449 $tpl->setContent($a_form->getHTML());
450 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ executeCommand()

ilBlogPostingGUI::executeCommand ( )

execute command

Reimplemented from ilPageObjectGUI.

Definition at line 119 of file class.ilBlogPostingGUI.php.

119 : string
120 {
121 $ilCtrl = $this->ctrl;
122 $ilLocator = $this->locator;
124
125 $next_class = $ilCtrl->getNextClass($this);
126
127 $posting = $this->getBlogPosting();
128 $ilCtrl->setParameter($this, "blpg", $posting->getId());
129
130 switch ($next_class) {
131 case "ilcommentgui":
132 // $this->getTabs();
133 // $ilTabs->setTabActive("pg");
134 return $this->previewFullscreen();
135
136 default:
137 if ($ilCtrl->getCmd() === "deactivatePageToList") {
138 $this->tpl->setOnScreenMessage('success', $this->lng->txt("blog_draft_info"), true);
139 } elseif ($ilCtrl->getCmd() === "activatePageToList") {
140 $this->tpl->setOnScreenMessage('success', $this->lng->txt("blog_new_posting_info"), true);
141 }
142 $this->setPresentationTitle($posting->getTitle());
143
144 $tpl->setTitle(ilObject::_lookupTitle($this->getBlogPosting()->getBlogId()) . ": " . // #15017
145 $posting->getTitle());
147 ilUtil::getImagePath("standard/icon_blog.svg"),
148 $this->lng->txt("obj_blog")
149 ); // #12879
150
151 $ilLocator->addItem(
152 $posting->getTitle(),
153 $ilCtrl->getLinkTarget($this, "preview")
154 );
155 return parent::executeCommand();
156 }
157 }
previewFullscreen()
Needed for portfolio/blog handling.
static _lookupTitle(int $obj_id)
setPresentationTitle(string $a_title="")
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon

References ilPageObjectGUI\$ctrl, $locator, ilPageObjectGUI\$tpl, ilObject\_lookupTitle(), ilUtil\getImagePath(), ILIAS\Repository\lng(), previewFullscreen(), ilPageObjectGUI\setPresentationTitle(), ILIAS\UICore\GlobalTemplate\setTitle(), and ILIAS\UICore\GlobalTemplate\setTitleIcon().

+ Here is the call graph for this function:

◆ finishEditing()

ilBlogPostingGUI::finishEditing ( )

Reimplemented from ilPageObjectGUI.

Definition at line 868 of file class.ilBlogPostingGUI.php.

868 : void
869 {
870 $this->ctrl->setParameterByClass("ilobjbloggui", "bmn", "");
871 $this->ctrl->redirectByClass("ilobjbloggui", "render");
872 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getActivationCaptions()

ilBlogPostingGUI::getActivationCaptions ( )

Get captions for activation action menu entries.

Reimplemented from ilPageObjectGUI.

Definition at line 577 of file class.ilBlogPostingGUI.php.

577 : array
578 {
580
581 return array("deactivatePage" => $lng->txt("blog_toggle_draft"),
582 "activatePage" => $lng->txt("blog_toggle_final"));
583 }

References $lng.

◆ getCommentsHTMLExport()

ilBlogPostingGUI::getCommentsHTMLExport ( )

Definition at line 852 of file class.ilBlogPostingGUI.php.

852 : string
853 {
854 return $this->getNotesHTML(
855 $this->getBlogPosting(),
856 false,
857 $this->enable_public_notes,
858 false,
859 null,
860 true
861 );
862 }
getNotesHTML(?object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, ?callable $a_callback=null, bool $export=false)
Get html for public and/or private notes.

◆ getDisabledText()

ilBlogPostingGUI::getDisabledText ( )

Reimplemented from ilPageObjectGUI.

Definition at line 847 of file class.ilBlogPostingGUI.php.

847 : string
848 {
849 return $this->lng->txt("blog_draft_text");
850 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getFirstMediaObjectAsTag()

ilBlogPostingGUI::getFirstMediaObjectAsTag ( int  $a_width = 144,
int  $a_height = 144,
?string  $a_export_directory = null 
)
protected

Definition at line 779 of file class.ilBlogPostingGUI.php.

783 : string {
784 $this->obj->buildDom();
785 $mob_ids = $this->obj->collectMediaObjects();
786 if ($mob_ids) {
787 foreach ($mob_ids as $mob_id) {
788 $mob_obj = new ilObjMediaObject((int) $mob_id);
789 $mob_item = $mob_obj->getMediaItem("Standard");
790 if (stripos($mob_item->getFormat(), "image") !== false) {
791 $mob_size = $mob_item->getOriginalSize();
792 if (is_null($mob_size)) {
793 continue;
794 }
795 if ($mob_size["width"] >= $a_width ||
796 $mob_size["height"] >= $a_height) {
797 if (!$a_export_directory) {
798 $mob_dir = ilObjMediaObject::_getDirectory($mob_obj->getId());
799 } else {
800 // see ilCOPageHTMLExport::exportHTMLMOB()
801 $mob_dir = "./mobs/mm_" . $mob_obj->getId();
802 }
803 $mob_res = self::parseImage(
804 $mob_size["width"],
805 $mob_size["height"],
806 $a_width,
807 $a_height
808 );
809
810
811 $location = $mob_obj->getStandardSrc();
812
813 return '<img' .
814 ' src="' . $location . '"' .
815 ' width="' . $mob_res[0] . '"' .
816 ' height="' . $mob_res[1] . '"' .
817 ' class="ilBlogListItemSnippetPreviewImage ilFloatLeft noMirror"' .
818 ' />';
819 }
820 }
821 }
822 }
823 return "";
824 }
$location
Definition: buildRTE.php:22
static parseImage(int $src_width, int $src_height, int $tgt_width, int $tgt_height)
static _getDirectory(int $a_mob_id)
Get absolute directory.

References $location, and ilObjMediaObject\_getDirectory().

+ Here is the call graph for this function:

◆ getPageHeading()

ilBlogPostingGUI::getPageHeading ( )
protected

Get page heading see also https://docu.ilias.de/goto_docu_wiki_wpage_5793_1357.html the presentation heading has a defined layout, title is not from page content.

Definition at line 308 of file class.ilBlogPostingGUI.php.

308 : string
309 {
310 $author = "";
311 if (!$this->isInWorkspace()) {
312 $authors = array();
313 $author_id = $this->getBlogPosting()->getAuthor();
314 if ($author_id) {
315 $authors[] = $this->profile_gui->getNamePresentation($author_id);
316 }
317
318 foreach (ilBlogPosting::getPageContributors("blp", $this->getBlogPosting()->getId()) as $editor) {
319 if ($editor["user_id"] != $author_id) {
320 $authors[] = $this->profile_gui->getNamePresentation($editor["user_id"]);
321 }
322 }
323
324 if ($authors) {
325 $author = implode(", ", $authors) . " - ";
326 }
327 }
330 $tpl = new ilTemplate("tpl.posting_head.html", true, true, "components/ILIAS/Blog");
331
332 // reading time
333 $reading_time = $this->reading_time_manager->getReadingTime(
334 $this->getBlogPosting()->getParentId(),
335 $this->getBlogPosting()->getId()
336 );
337 if (!is_null($reading_time)) {
338 $this->lng->loadLanguageModule("copg");
339 $tpl->setCurrentBlock("reading_time");
341 "READING_TIME",
342 $this->lng->txt("copg_est_reading_time") . ": " .
343 sprintf($this->lng->txt("copg_x_minutes"), $reading_time)
344 );
346 }
347
348 $tpl->setVariable("TITLE", $this->getBlogPosting()->getTitle());
350 "DATETIME",
351 $author . ilDatePresentation::formatDate($this->getBlogPosting()->getCreated())
352 );
354 return $tpl->get();
355 }
static setUseRelativeDates(bool $a_status)
set use relative dates
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static getPageContributors(string $a_parent_type, int $a_page_id, string $a_lang="-")
Get all contributors for parent object.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.

References ilDatePresentation\formatDate(), ILIAS\Survey\Mode\getId(), ilPageObject\getPageContributors(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), ILIAS\Repository\lng(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

+ Here is the call graph for this function:

◆ getParentObjId()

ilBlogPostingGUI::getParentObjId ( )
protected

Definition at line 696 of file class.ilBlogPostingGUI.php.

696 : int
697 {
698 if ($this->node_id) {
699 if ($this->isInWorkspace()) {
700 return $this->access_handler->getTree()->lookupObjectId($this->node_id);
701 }
702
703 return ilObject::_lookupObjId($this->node_id);
704 }
705 return 0;
706 }
static _lookupObjId(int $ref_id)

References ilObject\_lookupObjId().

+ Here is the call graph for this function:

◆ getSnippet()

static ilBlogPostingGUI::getSnippet ( int  $a_id,
bool  $a_truncate = false,
int  $a_truncate_length = 500,
string  $a_truncate_sign = "...",
bool  $a_include_picture = false,
int  $a_picture_width = 144,
int  $a_picture_height = 144,
?string  $a_export_directory = null 
)
static

Get first text paragraph of page.

Definition at line 738 of file class.ilBlogPostingGUI.php.

747 : string {
748 $bpgui = new self(0, null, $a_id);
749
750 // scan the full page for media objects
751 $img = "";
752 if ($a_include_picture) {
753 $img = $bpgui->getFirstMediaObjectAsTag($a_picture_width, $a_picture_height, $a_export_directory);
754 }
755
756 $bpgui->setRawPageContent(true);
757 $bpgui->setAbstractOnly(true);
758
759 // #8627: export won't work - should we set offline mode?
760 $bpgui->setFileDownloadLink(".");
761 $bpgui->setFullscreenLink(".");
762 $bpgui->setSourcecodeDownloadScript(".");
763 $bpgui->setProfileBackUrl(".");
764
765 // render without title
766 $page = $bpgui->showPage();
767
768 if ($a_truncate) {
769 $page = ilPageObject::truncateHTML($page, $a_truncate_length, $a_truncate_sign);
770 }
771
772 if ($img) {
773 $page = '<div>' . $img . $page . '</div><div style="clear:both;"></div>';
774 }
775
776 return $page;
777 }
static truncateHTML(string $a_text, int $a_length=100, string $a_ending='...', bool $a_exact=false, bool $a_consider_html=true)
Truncate (html) string.

Referenced by ilObjBlog\deliverRSS(), ilBlogPosting\getNotificationAbstract(), and ILIAS\Blog\News\NewsManager\handle().

+ Here is the caller graph for this function:

◆ getTabs()

ilBlogPostingGUI::getTabs ( string  $a_activate = "")

Reimplemented from ilPageObjectGUI.

Definition at line 357 of file class.ilBlogPostingGUI.php.

357 : void
358 {
359 $ilCtrl = $this->ctrl;
360
361 $ilCtrl->setParameterByClass("ilobjbloggui", "blpg", $this->getBlogPosting()->getId());
362
363 parent::getTabs($a_activate);
364 }

References ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ initDateForm()

ilBlogPostingGUI::initDateForm ( )

Definition at line 536 of file class.ilBlogPostingGUI.php.

537 {
539 $ilCtrl = $this->ctrl;
540
541 $form = new ilPropertyFormGUI();
542 $form->setFormAction($ilCtrl->getFormAction($this));
543 $form->setTitle($lng->txt('blog_edit_date'));
544
545 $date = new ilDateTimeInputGUI($lng->txt("date"), "date");
546 $date->setRequired(true);
547 $date->setShowTime(true);
548 $date->setInfo($lng->txt('blog_edit_date_info'));
549 $form->addItem($date);
550
551 $date->setDate($this->getPageObject()->getCreated());
552
553 $form->addCommandButton('updateDate', $lng->txt('save'));
554 $form->addCommandButton('cancelEdit', $lng->txt('cancel'));
555
556 return $form;
557 }
This class represents a date/time property in a property form.
setFormAction(string $a_formaction)
ilPropertyFormGUI $form
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

References $lng.

◆ initKeywordsForm()

ilBlogPostingGUI::initKeywordsForm ( )
protected
Exceptions
ilCtrlException

Definition at line 653 of file class.ilBlogPostingGUI.php.

654 {
655 global $DIC;
656
657 $ui_factory = $DIC->ui()->factory();
658
659 $keywords = ilBlogPosting::getKeywords(
660 $this->getBlogPosting()->getBlogId(),
661 $this->getBlogPosting()->getId()
662 );
663
664 // other keywords in blog
665 $other = array();
666 foreach ($this->posting_manager->getAllByBlog($this->getBlogPosting()->getBlogId(), 0) as $posting) {
667 $pid = $posting->getId();
668 if ($pid !== $this->getBlogPosting()->getId()) {
669 $other = array_merge(
670 $other,
671 ilBlogPosting::getKeywords($this->getBlogPosting()->getBlogId(), $pid)
672 );
673 }
674 }
675 // #17414
676 $other = array_unique($other);
677 sort($other, SORT_LOCALE_STRING);
678
679 $input_tag = $ui_factory->input()->field()->tag($this->lng->txt("blog_keywords"), $other, $this->lng->txt("blog_keyword_enter"))->withUserCreatedTagsAllowed(true);
680 if (count($keywords) > 0) {
681 $input_tag = $input_tag->withValue($keywords);
682 }
683
684 $DIC->ctrl()->setParameter(
685 $this,
686 'tags',
687 'tags_processing'
688 );
689
690 $section = $ui_factory->input()->field()->section([$input_tag], $this->lng->txt("blog_edit_keywords"), "");
691
692 $form_action = $DIC->ctrl()->getFormAction($this, "saveKeywordsForm");
693 return $ui_factory->input()->container()->form()->standard($form_action, ["tags" => $section]);
694 }
static getKeywords(int $a_obj_id, int $a_posting_id)
This describes a standard form.
Definition: Standard.php:29

References $DIC, ILIAS\Survey\Mode\getId(), ilBlogPosting\getKeywords(), ILIAS\Repository\lng(), and ILIAS\UI\examples\Symbol\Glyph\Sort\sort().

+ Here is the call graph for this function:

◆ initTitleForm()

ilBlogPostingGUI::initTitleForm ( )

Definition at line 474 of file class.ilBlogPostingGUI.php.

475 {
477 $ilCtrl = $this->ctrl;
478
479 $form = new ilPropertyFormGUI();
480 $form->setFormAction($ilCtrl->getFormAction($this));
481 $form->setTitle($lng->txt('blog_rename_posting'));
482
483 $title = new ilTextInputGUI($lng->txt("title"), "title");
484 $title->setRequired(true);
485 $form->addItem($title);
486
487 $title->setValue($this->getPageObject()->getTitle());
488
489 $form->addCommandButton('updateTitle', $lng->txt('save'));
490 $form->addCommandButton('cancelEdit', $lng->txt('cancel'));
491
492 return $form;
493 }
This class represents a text property in a property form.

References $lng, and ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle().

+ Here is the call graph for this function:

◆ isInWorkspace()

ilBlogPostingGUI::isInWorkspace ( )
protected

Is current page part of personal workspace blog?

Definition at line 270 of file class.ilBlogPostingGUI.php.

270 : bool
271 {
272 $class = '';
273 if (is_object($this->access_handler)) {
274 $class = get_class($this->access_handler);
275 }
276
277 return (bool) stristr($class, "workspace");
278 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ observeNoteAction()

ilBlogPostingGUI::observeNoteAction ( int  $a_blog_id,
int  $a_posting_id,
string  $a_type,
string  $a_action,
int  $a_note_id 
)

Definition at line 564 of file class.ilBlogPostingGUI.php.

570 : void {
571 // #10040 - get note text
572 $note = $this->notes->domain()->getById($a_note_id);
573 $text = $note->getText();
574 ilObjBlog::sendNotification("comment", $this->isInWorkspace(), $this->node_id, $a_posting_id, $text);
575 }

◆ parseImage()

static ilBlogPostingGUI::parseImage ( int  $src_width,
int  $src_height,
int  $tgt_width,
int  $tgt_height 
)
staticprotected

Definition at line 826 of file class.ilBlogPostingGUI.php.

831 : array {
832 $ratio_width = $ratio_height = 1;
833 if ($src_width > $tgt_width) {
834 $ratio_width = $tgt_width / $src_width;
835 }
836 if ($src_height > $tgt_height) {
837 $ratio_height = $tgt_height / $src_height;
838 }
839 $shrink_ratio = min($ratio_width, $ratio_height);
840
841 return array(
842 (int) round($src_width * $shrink_ratio),
843 (int) round($src_height * $shrink_ratio)
844 );
845 }

◆ postOutputProcessing()

ilBlogPostingGUI::postOutputProcessing ( string  $a_output)

Finalizing output processing.

Reimplemented from ilPageObjectGUI.

Definition at line 283 of file class.ilBlogPostingGUI.php.

285 : string {
286 // #8626/#9370
287 if ($this->showPageHeading()) {
288 $a_output = $this->getPageHeading() . $a_output;
289 }
290
291 return $a_output;
292 }
getPageHeading()
Get page heading see also https://docu.ilias.de/goto_docu_wiki_wpage_5793_1357.html the presentation ...

◆ preview()

ilBlogPostingGUI::preview ( ?string  $a_mode = null)

Definition at line 179 of file class.ilBlogPostingGUI.php.

181 : string {
182 global $DIC;
183 $ilCtrl = $this->ctrl;
186
187 $toolbar = $DIC->toolbar();
188 $append = "";
189
190 $this->getBlogPosting()->increaseViewCnt();
191
192 $wtpl = new ilTemplate(
193 "tpl.blog_page_view_main_column.html",
194 true,
195 true,
196 "components/ILIAS/Blog"
197 );
198
199 // page commands
200 if (!$a_mode) {
201 if (!$this->getEnableEditing()) {
202 $this->ctrl->redirect($this, "previewFullscreen");
203 }
204 } else {
205 $callback = array($this, "observeNoteAction");
206
207 // notes
208
209 $may_delete_comments = ($this->checkAccess("contribute") &&
210 $ilSetting->get("comments_del_tutor", '1'));
211
212 //$wtpl->setVariable("TOOLBAR", $toolbar->getHTML());
213
214 $wtpl->setVariable("NOTES", $this->getNotesHTML(
215 $this->getBlogPosting(),
216 false,
217 $this->enable_public_notes,
218 $may_delete_comments,
219 $callback
220 ));
221 }
222 // permanent link
223 $ref_id = $this->isInWorkspace()
224 ? 0
226 $wsp_id = $this->isInWorkspace()
227 ? $this->node_id
228 : 0;
229 $this->blog_gui->permanentLink($ref_id, $wsp_id)->setPermanentLink($this->blpg);
230
231 $wtpl->setVariable("PAGE", parent::preview());
232
233 $tpl->setLoginTargetPar("blog_" . $this->node_id . $append);
234
235 $ilCtrl->setParameter($this, "blpg", $this->getBlogPosting()->getId());
236
237 return $wtpl->get();
238 }
setLoginTargetPar(string $a_val)
Set target parameter for login (public sector).
$ref_id
Definition: ltiauth.php:66
global $ilSetting
Definition: privfeed.php:31

◆ previewFullscreen()

ilBlogPostingGUI::previewFullscreen ( )

Needed for portfolio/blog handling.

Definition at line 244 of file class.ilBlogPostingGUI.php.

244 : string
245 {
246 $this->add_date = true;
247 return $this->preview("fullscreen");
248 }

References ILIAS\UI\examples\Symbol\Glyph\Preview\preview().

Referenced by executeCommand().

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

◆ saveKeywordsForm()

ilBlogPostingGUI::saveKeywordsForm ( )

Definition at line 708 of file class.ilBlogPostingGUI.php.

708 : void
709 {
710 global $DIC;
711
712 $request = $DIC->http()->request();
713 $form = $this->initKeywordsForm();
714
715 if ($request->getMethod() === "POST"
716 && $request->getQueryParams()['tags'] == 'tags_processing') {
717 $form = $form->withRequest($request);
718 $result = $form->getData();
719 //TODO identify the input instead of use 0
720 $keywords = $result["tags"][0];
721
722 if ($this->checkAccess("write") || $this->checkAccess("contribute")) {
723 if (is_array($keywords)) {
724 $this->getBlogPosting()->updateKeywords($keywords);
725 } else {
726 $this->getBlogPosting()->updateKeywords([]);
727 }
728 }
729
730 $this->ctrl->setParameterByClass(ilObjBlogGUI::class, "blpg", "");
731 $this->ctrl->redirectByClass("ilObjBlogGUI", "");
732 }
733 }
EditGUIRequest $request

References $DIC, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ setBlogPosting()

ilBlogPostingGUI::setBlogPosting ( ilBlogPosting  $a_posting)

Definition at line 159 of file class.ilBlogPostingGUI.php.

159 : void
160 {
161 $this->setPageObject($a_posting);
162 }
setPageObject(ilPageObject $a_pg_obj)

References ilPageObjectGUI\setPageObject().

+ Here is the call graph for this function:

◆ showEditToolbar()

ilBlogPostingGUI::showEditToolbar ( )
protected

Show edit toolbar.

Reimplemented from ilPageObjectGUI.

Definition at line 864 of file class.ilBlogPostingGUI.php.

864 : void
865 {
866 }

◆ showPage()

ilBlogPostingGUI::showPage ( string  $a_title = "")

Definition at line 250 of file class.ilBlogPostingGUI.php.

252 : string {
253 $this->setTemplateOutput(false);
254
255 $this->setPresentationTitle("");
256 if (!$this->getAbstractOnly() && !$this->showPageHeading()) {
257 if ($a_title !== "") {
258 $this->setPresentationTitle($a_title);
259 } else {
260 $this->setPresentationTitle($this->getBlogPosting()->getTitle());
261 }
262 }
263 $this->getBlogPosting()->increaseViewCnt();
264 return parent::showPage();
265 }
setTemplateOutput(bool $a_output=true)

◆ showPageHeading()

ilBlogPostingGUI::showPageHeading ( )
protected

Definition at line 294 of file class.ilBlogPostingGUI.php.

294 : bool
295 {
296 if (!$this->getAbstractOnly() && $this->add_date) {
297 return true;
298 }
299
300 return false;
301 }

◆ updateDate()

ilBlogPostingGUI::updateDate ( )

Definition at line 512 of file class.ilBlogPostingGUI.php.

512 : void
513 {
515
516 $form = $this->initDateForm();
517 if ($form->checkInput()) {
518 if ($this->checkAccess("write") || $this->checkAccess("contribute")) {
519 $dt = $form->getItemByPostVar("date");
520 $dt = $dt->getDate();
521
522 $page = $this->getPageObject();
523 $page->setCreated($dt);
524 $page->update();
525
526 $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
527 //$ilCtrl->redirect($this, "preview");
528 $this->ctrl->redirectByClass("ilObjBlogGUI", "");
529 }
530 }
531
533 $this->editTitle($form);
534 }
editTitle(?ilPropertyFormGUI $a_form=null)
getItemByPostVar(string $a_post_var)

References $lng, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ updateTitle()

ilBlogPostingGUI::updateTitle ( )

Definition at line 452 of file class.ilBlogPostingGUI.php.

452 : void
453 {
455
456 $form = $this->initTitleForm();
457 if ($form->checkInput()) {
458 if ($this->checkAccess("write") || $this->checkAccess("contribute")) {
459 $page = $this->getPageObject();
460 $page->setTitle($form->getInput("title"));
461 $page->update();
462 $this->domain->news()->handle($page, true);
463
464 $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
465 //$ilCtrl->redirect($this, "preview");
466 $this->ctrl->redirectByClass("ilObjBlogGUI", "");
467 }
468 }
469
471 $this->editTitle($form);
472 }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References $lng, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

Field Documentation

◆ $access_handler

object ilBlogPostingGUI::$access_handler = null
protected

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

◆ $add_date

bool ilBlogPostingGUI::$add_date = false

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

◆ $blog_gui

InternalGUIService ilBlogPostingGUI::$blog_gui
protected

Definition at line 38 of file class.ilBlogPostingGUI.php.

◆ $blog_request

StandardGUIRequest ilBlogPostingGUI::$blog_request
protected

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

◆ $blpg

int ilBlogPostingGUI::$blpg = 0
protected

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

◆ $domain

InternalDomainService ilBlogPostingGUI::$domain
protected

Definition at line 37 of file class.ilBlogPostingGUI.php.

◆ $enable_public_notes

bool ilBlogPostingGUI::$enable_public_notes = false
protected

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

◆ $fetchall

bool ilBlogPostingGUI::$fetchall = false
protected

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

◆ $locator

ilLocatorGUI ilBlogPostingGUI::$locator
protected

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

Referenced by executeCommand().

◆ $lom_services

LOMServices ilBlogPostingGUI::$lom_services
protected

Definition at line 46 of file class.ilBlogPostingGUI.php.

◆ $may_contribute

bool ilBlogPostingGUI::$may_contribute = false
protected

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

Referenced by checkAccess().

◆ $node_id

int ilBlogPostingGUI::$node_id
protected

Definition at line 47 of file class.ilBlogPostingGUI.php.

◆ $notes

ILIAS Notes Service ilBlogPostingGUI::$notes
protected

Definition at line 40 of file class.ilBlogPostingGUI.php.

◆ $posting_manager

PostingManager ilBlogPostingGUI::$posting_manager
protected

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

◆ $profile_gui

ProfileGUI ilBlogPostingGUI::$profile_gui
protected

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

◆ $reading_time_manager

ReadingTimeManager ilBlogPostingGUI::$reading_time_manager
protected

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

◆ $settings

ilSetting ilBlogPostingGUI::$settings
protected

Definition at line 45 of file class.ilBlogPostingGUI.php.

◆ $tabs

ilTabsGUI ilBlogPostingGUI::$tabs
protected

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

◆ $term

string ilBlogPostingGUI::$term = ""
protected

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


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