ILIAS  release_8 Revision v8.23
ilObjBlogGUI Class Reference

Class ilObjBlogGUI. More...

+ Inheritance diagram for ilObjBlogGUI:
+ Collaboration diagram for ilObjBlogGUI:

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getType ()
 
 getItems ()
 
 executeCommand ()
 
 getRenderedContent ()
 
 infoScreen ()
 this one is called from the info button in the repository More...
 
 infoScreenForward ()
 
 createPosting ()
 Create new posting. More...
 
 render ()
 Render object context. More...
 
 getHTML ()
 Return embeddable HTML chunk. More...
 
 preview ()
 Render fullscreen presentation. More...
 
 export (bool $a_with_comments=false)
 Build and deliver export file. More...
 
 renderFullScreen (string $a_content, string $a_navigation)
 Build fullscreen context. More...
 
 renderFullscreenHeader (ilGlobalTemplateInterface $a_tpl, int $a_user_id, bool $a_export=false)
 Render banner, user name. More...
 
 renderList (array $items, string $a_cmd="preview", string $a_link_template="", bool $a_show_inactive=false, string $a_export_directory="")
 Build posting month list. More...
 
 renderToolbarNavigation (array $a_items, bool $single_posting=false)
 Toolbar navigation. More...
 
 getNextMonth (array $a_items)
 Get next month. More...
 
 getPreviousMonth (array $a_items)
 
 getLatestMonth (array $a_items)
 
 getNextPosting (array $a_items)
 Get next posting. More...
 
 getPreviousPosting (array $a_items)
 Get previous posting. More...
 
 getLatestPosting (array $a_items)
 Get previous posting. More...
 
 renderNavigation (string $a_list_cmd="render", string $a_posting_cmd="preview", string $a_link_template=null, bool $a_show_inactive=false, int $a_blpg=0)
 Build navigation blocks. More...
 
 getKeywords (bool $a_show_inactive, ?int $a_posting_id=null)
 Get keywords for single posting or complete blog. More...
 
 buildExportFile (bool $a_include_comments=false, bool $print_version=false)
 Build export file. More...
 
 getNotesSubId ()
 
 disableNotes (bool $a_value=false)
 
 filterItemsByKeyword (array $a_items, string $a_keyword)
 
 approve ()
 
 contributors ()
 
 addUserFromAutoComplete ()
 Autocomplete submit. More...
 
 addContributor (array $a_user_ids=array(), ?string $a_user_type=null)
 Centralized method to add contributors. More...
 
 confirmRemoveContributor ()
 Used in ilContributorTableGUI. More...
 
 removeContributor ()
 
 deactivateAdmin ()
 
 setContentStyleSheet (ilGlobalTemplateInterface $a_tpl=null)
 
 printViewSelection ()
 
 printPostings ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode (bool $mode=true)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 Add desktop item public. More...
 
 removeFromDeskObject ()
 Remove from desktop public. More...
 

Static Public Member Functions

static lookupSubObjectTitle (int $a_blog_id, int $a_posting_id)
 Get title for blog posting (used in ilNotesGUI) More...
 
static _goto (string $a_target)
 Deep link. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

bool $prtf_embed = false
 
- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initCreationForms (string $new_type)
 
 afterSave (ilObject $new_object)
 
 setSettingsSubTabs (string $a_active)
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $form)
 
 setTabs ()
 
 triggerAssignmentTool ()
 
 getListItems (bool $a_show_inactive=false)
 Filter blog postings by month, keyword or author. More...
 
 buildEmbedded (string $a_content, string $a_nav)
 Combine content (list/posting) and navigation to html chunk. More...
 
 buildPostingList (int $a_obj_id)
 Gather all blog postings. More...
 
 buildExportLink (string $a_template, string $a_type, string $a_id)
 Build export link. More...
 
 renderNavigationByDate (array $a_items, string $a_list_cmd="render", string $a_posting_cmd="preview", ?string $a_link_template=null, bool $a_show_inactive=false, int $a_blpg=0)
 Build navigation by date block. More...
 
 renderNavigationByKeywords (string $a_list_cmd="render", bool $a_show_inactive=false, string $a_link_template="", int $a_blpg=0)
 Build navigation by keywords block. More...
 
 renderNavigationByAuthors (array $a_items, string $a_list_cmd="render", bool $a_show_inactive=false)
 
 addHeaderActionForCommand (string $a_cmd)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null, bool $is_preview=false)
 
 setNotification ()
 
 filterInactivePostings ()
 Filter inactive items from items list. More...
 
 isAdmin ()
 Check if user has admin access (approve, may edit & deactivate all postings) More...
 
 mayEditPosting (int $a_posting_id, int $a_author_id=null)
 Check if user may edit posting. More...
 
 mayContribute ()
 Check if user may contribute at all. More...
 
 addLocatorItems ()
 
 exportWithComments ()
 Handle export choice. More...
 
 forwardExport ()
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

string $rendered_content = ""
 
ILIAS Notes Service $notes
 
ILIAS Blog ReadingTime BlogSettingsGUI $reading_time_gui
 
ILIAS Blog ReadingTime ReadingTimeManager $reading_time_manager
 
StandardGUIRequest $blog_request
 
ilHelpGUI $help
 
ilTabsGUI $tabs
 
ilNavigationHistory $nav_history
 
ilRbacAdmin $rbacadmin
 
string $month = ""
 
array $items = []
 
string $keyword = ""
 
int $author = null
 
bool $month_default = false
 
int $gtp = 0
 
string $edt
 
int $blpg = 0
 
int $old_nr = 0
 
int $ppage = 0
 
int $user_page = 0
 
string $prvm
 
int $ntf = 0
 
int $apid = 0
 
string $new_type = ""
 
int $prt_id = 0
 
bool $disable_notes = false
 
ContextServices $tool_context
 
ILIAS HTTP Services $http
 
ILIAS DI UIServices $ui
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = array()
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjBlogGUI::__construct ( int  $a_id = 0,
int  $a_id_type = self::REPOSITORY_NODE_ID,
int  $a_parent_node_id = 0 
)

Definition at line 67 of file class.ilObjBlogGUI.php.

References $blog_request, $DIC, ilObject2GUI\$lng, XapiProxy\$req, ILIAS\GlobalScreen\Provider\__construct(), buildPostingList(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ilLanguage\loadLanguageModule(), ILIAS\Repository\locator(), ilBlogPosting\lookupBlogId(), ILIAS\Repository\object(), ILIAS\Repository\settings(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

71  {
72  global $DIC;
73 
74  $this->settings = $DIC->settings();
75  $this->help = $DIC["ilHelp"];
76  $this->tabs = $DIC->tabs();
77  $this->nav_history = $DIC["ilNavigationHistory"];
78  $this->user = $DIC->user();
79  $this->toolbar = $DIC->toolbar();
80  $this->tree = $DIC->repositoryTree();
81  $this->locator = $DIC["ilLocator"];
82  $this->rbac_review = $DIC->rbac()->review();
83  $this->rbacadmin = $DIC->rbac()->admin();
84  $this->http = $DIC->http();
85  $this->ui = $DIC->ui();
86 
87  $lng = $DIC->language();
88  $ilCtrl = $DIC->ctrl();
89 
90  $this->blog_request = $DIC->blog()
91  ->internal()
92  ->gui()
93  ->standardRequest();
94 
96 
97  $this->gtp = $req->getGotoPage();
98  $this->edt = $req->getEditing();
99  $this->blpg = $req->getBlogPage();
100  $this->old_nr = $req->getOldNr();
101  $this->ppage = $req->getPPage();
102  $this->user_page = $req->getUserPage();
103  $this->new_type = $req->getNewType();
104  $this->prvm = $req->getPreviewMode();
105  $this->ntf = $req->getNotification();
106  $this->apid = $req->getApId();
107  $this->month = $req->getMonth();
108  $this->keyword = $req->getKeyword();
109  $this->author = $req->getAuthor();
110  $this->prt_id = $req->getPrtId();
111 
112  $this->tool_context = $DIC->globalScreen()->tool()->context();
113 
114  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
115 
116  $blog_page = $this->blog_request->getBlogPage();
117  if ($blog_page > 0 &&
118  ilBlogPosting::lookupBlogId($blog_page) !== $this->object->getId()) {
119  throw new ilException("Posting ID does not match blog.");
120  }
121 
122  $blog_id = 0;
123  if ($this->object) {
124  // gather postings by month
125  $this->items = $this->buildPostingList($this->object->getId());
126  if ($this->items) {
127  // current month (if none given or empty)
128  if (!$this->month || !$this->items[$this->month]) {
129  $m = array_keys($this->items);
130  $this->month = array_shift($m);
131  $this->month_default = true;
132  }
133  }
134 
135  $ilCtrl->setParameter($this, "bmn", $this->month);
136  $blog_id = $this->object->getId();
137  }
138 
139  $lng->loadLanguageModule("blog");
140  $ilCtrl->saveParameter($this, "prvm");
141 
142  $cs = $DIC->contentStyle();
143  $this->content_style_gui = $cs->gui();
144  if (is_object($this->object)) {
145  if ($this->id_type !== self::REPOSITORY_NODE_ID) {
146  $this->content_style_domain = $cs->domain()->styleForObjId($this->object->getId());
147  } else {
148  $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
149  }
150  }
151 
152  $this->reading_time_gui = new \ILIAS\Blog\ReadingTime\BlogSettingsGUI($blog_id);
153  $this->reading_time_manager = new \ILIAS\Blog\ReadingTime\ReadingTimeManager();
154  $this->notes = $DIC->notes();
155  }
buildPostingList(int $a_obj_id)
Gather all blog postings.
StandardGUIRequest $blog_request
loadLanguageModule(string $a_module)
Load language module.
catch(\Exception $e) $req
Definition: xapiproxy.php:93
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
static lookupBlogId(int $a_posting_id)
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjBlogGUI::_goto ( string  $a_target)
static

Deep link.

Definition at line 2927 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$access, $DIC, ilObjectGUI\$id, and ilRBACAccessHandler\checkAccess().

2927  : void
2928  {
2929  global $DIC;
2930 
2931  $ilCtrl = $DIC->ctrl();
2932  $access = $DIC->access();
2933 
2934  $id = explode("_", $a_target);
2935  if (substr($a_target, -3) === "wsp") {
2936  $ilCtrl->setParameterByClass("ilSharedResourceGUI", "wsp_id", $id[0]);
2937 
2938  if (count($id) >= 2) {
2939  if (is_numeric($id[1])) {
2940  $ilCtrl->setParameterByClass("ilSharedResourceGUI", "gtp", $id[1]);
2941  } else {
2942  $ilCtrl->setParameterByClass("ilSharedResourceGUI", "kwd", $id[1]);
2943  }
2944  if (($id[2] ?? "") === "edit") {
2945  $ilCtrl->setParameterByClass("ilSharedResourceGUI", "edt", $id[2]);
2946  }
2947  }
2948  $ilCtrl->redirectByClass("ilSharedResourceGUI", "");
2949  } else {
2950  $ilCtrl->setParameterByClass("ilRepositoryGUI", "ref_id", $id[0]);
2951 
2952  if (count($id) >= 2) {
2953  if (is_numeric($id[1])) {
2954  $ilCtrl->setParameterByClass("ilRepositoryGUI", "gtp", $id[1]);
2955  } else {
2956  $ilCtrl->setParameterByClass("ilRepositoryGUI", "kwd", $id[1]);
2957  }
2958 
2959  if (($id[2] ?? "") === "edit") {
2960  $ilCtrl->setParameterByClass("ilRepositoryGUI", "edt", $id[2]);
2961  }
2962  }
2963  if ($access->checkAccess("read", "", $id[0])) {
2964  $ilCtrl->redirectByClass("ilRepositoryGUI", "preview");
2965  }
2966  if ($access->checkAccess("visible", "", $id[0])) {
2967  $ilCtrl->redirectByClass("ilRepositoryGUI", "infoScreen");
2968  }
2969  }
2970  }
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
global $DIC
Definition: feed.php:28
ilAccessHandler $access
+ Here is the call graph for this function:

◆ addContributor()

ilObjBlogGUI::addContributor ( array  $a_user_ids = array(),
?string  $a_user_type = null 
)

Centralized method to add contributors.

Definition at line 2788 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\$rbac_review, $rbacadmin, ilRbacAdmin\assignUser(), ilObject2GUI\checkPermissionBool(), contributors(), ILIAS\Repository\int(), ILIAS\Repository\object(), and ilLanguage\txt().

Referenced by addUserFromAutoComplete().

2791  : void {
2792  $ilCtrl = $this->ctrl;
2793  $lng = $this->lng;
2794  $rbacreview = $this->rbac_review;
2796  $a_user_type = (int) $a_user_type;
2797 
2798  if (!$this->checkPermissionBool("write")) {
2799  return;
2800  }
2801 
2802  if (!count($a_user_ids) || !$a_user_type) {
2803  $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"));
2804  $this->contributors();
2805  return;
2806  }
2807 
2808  // get contributor role
2809  $local_roles = array_keys($this->object->getAllLocalRoles($this->node_id));
2810  if (!in_array($a_user_type, $local_roles)) {
2811  $this->tpl->setOnScreenMessage('failure', $lng->txt("missing_perm"));
2812  $this->contributors();
2813  return;
2814  }
2815 
2816  foreach ($a_user_ids as $user_id) {
2817  if (!$rbacreview->isAssigned($user_id, $a_user_type)) {
2818  $rbacadmin->assignUser($a_user_type, $user_id);
2819  }
2820  }
2821 
2822  $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
2823  $ilCtrl->redirect($this, "contributors");
2824  }
ilRbacReview $rbac_review
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...
assignUser(int $a_rol_id, int $a_usr_id)
Assigns an user to a role.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
ilRbacAdmin $rbacadmin
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addHeaderActionForCommand()

ilObjBlogGUI::addHeaderActionForCommand ( string  $a_cmd)
protected

Definition at line 2446 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, $ilUser, ilObject2GUI\$user, ilObjectGUI\addHeaderAction(), ANONYMOUS_USER_ID, initHeaderAction(), ilObjectGUI\insertHeaderAction(), and ilCtrl\setParameter().

Referenced by executeCommand().

2448  : void {
2449  $ilUser = $this->user;
2450  $ilCtrl = $this->ctrl;
2451  // preview?
2452  if ($a_cmd === "preview" || $a_cmd === "previewEmbedded" || $a_cmd === "previewFullscreen" || $this->prvm) {
2453  // notification
2454  if ($ilUser->getId() !== ANONYMOUS_USER_ID) {
2455  if (!$this->prvm) {
2456  $ilCtrl->setParameter($this, "prvm", "fsc");
2457  }
2458  $this->insertHeaderAction($this->initHeaderAction(null, null, true));
2459  if (!$this->prvm) {
2460  $ilCtrl->setParameter($this, "prvm", "");
2461  }
2462  }
2463  } else {
2464  $this->addHeaderAction();
2465  }
2466  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
insertHeaderAction(?ilObjectListGUI $list_gui=null)
Insert header action into main template.
initHeaderAction(?string $sub_type=null, ?int $sub_id=null, bool $is_preview=false)
$ilUser
Definition: imgupload.php:34
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
addHeaderAction()
Add header action menu.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjBlogGUI::addLocatorItems ( )
protected

Definition at line 2684 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$locator, ilObject2GUI\$node_id, ilLocatorGUI\addItem(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

2684  : void
2685  {
2686  $ilLocator = $this->locator;
2687 
2688  if (is_object($this->object)) {
2689  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "preview"), "", $this->node_id);
2690  }
2691  }
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
ilLocatorGUI $locator
+ Here is the call graph for this function:

◆ addUserFromAutoComplete()

ilObjBlogGUI::addUserFromAutoComplete ( )

Autocomplete submit.

Definition at line 2755 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$lng, ilObject2GUI\$user, ilObjUser\_lookupId(), addContributor(), contributors(), ILIAS\Repository\int(), and ilLanguage\txt().

2755  : void
2756  {
2757  $lng = $this->lng;
2758 
2759  $user_login = $this->blog_request->getUserLogin();
2760  $user_type = $this->blog_request->getUserType();
2761 
2762  if (trim($user_login) === '') {
2763  $this->tpl->setOnScreenMessage('failure', $lng->txt('msg_no_search_string'));
2764  $this->contributors();
2765  return;
2766  }
2767  $users = explode(',', $user_login);
2768 
2769  $user_ids = array();
2770  foreach ($users as $user) {
2771  $user_id = ilObjUser::_lookupId($user);
2772 
2773  if (!$user_id) {
2774  $this->tpl->setOnScreenMessage('failure', $lng->txt('user_not_known'));
2775  $this->contributors();
2776  return;
2777  }
2778 
2779  $user_ids[] = (int) $user_id;
2780  }
2781 
2782  $this->addContributor($user_ids, $user_type);
2783  }
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 _lookupId($a_user_str)
addContributor(array $a_user_ids=array(), ?string $a_user_type=null)
Centralized method to add contributors.
+ Here is the call graph for this function:

◆ afterSave()

ilObjBlogGUI::afterSave ( ilObject  $new_object)
protected

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

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

179  : void
180  {
181  $ilCtrl = $this->ctrl;
182 
183  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
184  $ilCtrl->redirect($this, "");
185  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ approve()

ilObjBlogGUI::approve ( )

Definition at line 2693 of file class.ilObjBlogGUI.php.

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

2693  : void
2694  {
2695  if ($this->isAdmin() && $this->apid > 0) {
2696  $post = new ilBlogPosting($this->apid);
2697  $post->setApproved(true);
2698  $post->setBlogNodeId($this->node_id, ($this->id_type == self::WORKSPACE_NODE_ID));
2699  $post->update(true, false, true, "new"); // #13434
2700 
2701  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
2702  }
2703 
2704  $this->ctrl->redirect($this, "render");
2705  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isAdmin()
Check if user has admin access (approve, may edit & deactivate all postings)
$post
Definition: ltitoken.php:49
+ Here is the call graph for this function:

◆ buildEmbedded()

ilObjBlogGUI::buildEmbedded ( string  $a_content,
string  $a_nav 
)
protected

Combine content (list/posting) and navigation to html chunk.

Definition at line 1178 of file class.ilObjBlogGUI.php.

Referenced by executeCommand(), and getHTML().

1181  : string {
1182  $wtpl = new ilTemplate("tpl.blog_embedded.html", true, true, "Modules/Blog");
1183  $wtpl->setVariable("VAL_LIST", $a_content);
1184  $wtpl->setVariable("VAL_NAVIGATION", $a_nav);
1185  return $wtpl->get();
1186  }
+ Here is the caller graph for this function:

◆ buildExportFile()

ilObjBlogGUI::buildExportFile ( bool  $a_include_comments = false,
bool  $print_version = false 
)

Build export file.

Definition at line 2410 of file class.ilObjBlogGUI.php.

References $format, ilObject2GUI\$type, ilExport\_createExportDirectory(), ilExport\_getExportDirectory(), and ILIAS\Repository\object().

Referenced by export().

2413  : string {
2414  $type = "html";
2415  $format = explode("_", $this->blog_request->getFormat());
2416  if (($format[1] ?? "") === "comments" || $a_include_comments) {
2417  $a_include_comments = true;
2418  $type = "html_comments";
2419  }
2420 
2421  // create export file
2422  ilExport::_createExportDirectory($this->object->getId(), $type, "blog");
2423  $exp_dir = ilExport::_getExportDirectory($this->object->getId(), $type, "blog");
2424 
2425  $subdir = $this->object->getType() . "_" . $this->object->getId();
2426  if ($print_version) {
2427  $subdir .= "print";
2428  }
2429 
2430  $blog_export = new \ILIAS\Blog\Export\BlogHtmlExport($this, $exp_dir, $subdir);
2431  $blog_export->setPrintVersion($print_version);
2432  $blog_export->includeComments($a_include_comments);
2433  return $blog_export->exportHTML();
2434  }
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object.
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
$format
Definition: metadata.php:235
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildExportLink()

ilObjBlogGUI::buildExportLink ( string  $a_template,
string  $a_type,
string  $a_id 
)
protected

Build export link.

Definition at line 1675 of file class.ilObjBlogGUI.php.

References getKeywords().

Referenced by renderList(), renderNavigationByDate(), and renderNavigationByKeywords().

1679  : string {
1680  return \ILIAS\Blog\Export\BlogHtmlExport::buildExportLink($a_template, $a_type, $a_id, $this->getKeywords(false));
1681  }
getKeywords(bool $a_show_inactive, ?int $a_posting_id=null)
Get keywords for single posting or complete blog.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildPostingList()

ilObjBlogGUI::buildPostingList ( int  $a_obj_id)
protected

Gather all blog postings.

Definition at line 1341 of file class.ilObjBlogGUI.php.

References $items, $month, ilBlogPosting\getAllPostings(), and IL_CAL_DATE.

Referenced by __construct().

1343  : array {
1344  $author_found = false;
1345 
1346  $items = array();
1347  foreach (ilBlogPosting::getAllPostings($a_obj_id) as $posting) {
1348  if ($this->author &&
1349  ($posting["author"] == $this->author ||
1350  (is_array($posting["editors"] ?? false) && in_array($this->author, $posting["editors"])))) {
1351  $author_found = true;
1352  }
1353 
1354  $month = substr($posting["created"]->get(IL_CAL_DATE), 0, 7);
1355  $items[$month][$posting["id"]] = $posting;
1356  }
1357 
1358  if ($this->author && !$author_found) {
1359  $this->author = null;
1360  }
1361 
1362  return $items;
1363  }
static getAllPostings(int $a_blog_id, int $a_limit=1000, int $a_offset=0)
Get all postings of blog.
const IL_CAL_DATE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmRemoveContributor()

ilObjBlogGUI::confirmRemoveContributor ( )

Used in ilContributorTableGUI.

Definition at line 2829 of file class.ilObjBlogGUI.php.

References ILIAS\Repository\ctrl(), ilUserUtil\getNamePresentation(), and ILIAS\Repository\lng().

2829  : void
2830  {
2831  $ids = $this->blog_request->getIds();
2832 
2833  if (count($ids) === 0) {
2834  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("select_one"), true);
2835  $this->ctrl->redirect($this, "contributors");
2836  }
2837 
2838  $confirm = new ilConfirmationGUI();
2839  $confirm->setHeaderText($this->lng->txt('blog_confirm_delete_contributors'));
2840  $confirm->setFormAction($this->ctrl->getFormAction($this, 'removeContributor'));
2841  $confirm->setConfirm($this->lng->txt('delete'), 'removeContributor');
2842  $confirm->setCancel($this->lng->txt('cancel'), 'contributors');
2843 
2844  foreach ($ids as $user_id) {
2845  $confirm->addItem(
2846  'id[]',
2847  $user_id,
2848  ilUserUtil::getNamePresentation($user_id, false, false, "", true)
2849  );
2850  }
2851 
2852  $this->tpl->setContent($confirm->getHTML());
2853  }
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ contributors()

ilObjBlogGUI::contributors ( )

Definition at line 2712 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\$node_id, $tabs, ilObject2GUI\$toolbar, ilObject2GUI\$tpl, ilObject2GUI\checkPermissionBool(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ILIAS\Repository\object(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

Referenced by addContributor(), addUserFromAutoComplete(), and removeContributor().

2712  : void
2713  {
2714  $ilTabs = $this->tabs;
2715  $ilToolbar = $this->toolbar;
2716  $ilCtrl = $this->ctrl;
2717  $lng = $this->lng;
2718  $tpl = $this->tpl;
2719 
2720  if (!$this->checkPermissionBool("write")) {
2721  return;
2722  }
2723 
2724  $ilTabs->activateTab("contributors");
2725 
2726  $local_roles = $this->object->getAllLocalRoles($this->node_id);
2727 
2728  // add member
2730  $this,
2731  $ilToolbar,
2732  array(
2733  'auto_complete_name' => $lng->txt('user'),
2734  'submit_name' => $lng->txt('add'),
2735  'add_search' => true,
2736  'add_from_container' => $this->node_id,
2737  'user_type' => $local_roles
2738  ),
2739  true
2740  );
2741 
2742  $other_roles = $this->object->getRolesWithContributeOrRedact($this->node_id);
2743  if ($other_roles) {
2744  $this->tpl->setOnScreenMessage('info', sprintf($lng->txt("blog_contribute_other_roles"), implode(", ", $other_roles)));
2745  }
2746 
2747  $tbl = new ilContributorTableGUI($this, "contributors", $this->object->getAllLocalRoles($this->node_id));
2748 
2749  $tpl->setContent($tbl->getHTML());
2750  }
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...
ilToolbarGUI $toolbar
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
static fillAutoCompleteToolbar(object $parent_object, ilToolbarGUI $toolbar=null, array $a_options=[], bool $a_sticky=false)
array( auto_complete_name = $lng->txt('user'), auto_complete_size = 15, user_type = array(ilCoursePar...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createPosting()

ilObjBlogGUI::createPosting ( )

Create new posting.

Definition at line 939 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, $ilUser, ilObject2GUI\$user, ilObject\getTitle(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

939  : void
940  {
941  $ilCtrl = $this->ctrl;
943 
944  $title = $this->blog_request->getTitle();
945  if ($title) {
946  // create new posting
947  $posting = new ilBlogPosting();
948  $posting->setTitle($title);
949  $posting->setBlogId($this->object->getId());
950  $posting->setActive(false);
951  $posting->setAuthor($ilUser->getId());
952  $posting->create(false);
953 
954  // switch month list to current month (will include new posting)
955  $ilCtrl->setParameter($this, "bmn", date("Y-m"));
956 
957  $ilCtrl->setParameterByClass("ilblogpostinggui", "blpg", $posting->getId());
958  $ilCtrl->redirectByClass("ilblogpostinggui", "edit");
959  } else {
960  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("msg_no_title"), true);
961  $ilCtrl->redirect($this, "render");
962  }
963  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ deactivateAdmin()

ilObjBlogGUI::deactivateAdmin ( )

Definition at line 2886 of file class.ilObjBlogGUI.php.

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

2886  : void
2887  {
2888  if ($this->checkPermissionBool("write") && $this->apid > 0) {
2889  // ilBlogPostingGUI::deactivatePage()
2890  $post = new ilBlogPosting($this->apid);
2891  $post->setApproved(false);
2892  $post->setActive(false);
2893  $post->update(true, false, false);
2894 
2895  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
2896  }
2897 
2898  $this->ctrl->redirect($this, "render");
2899  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
$post
Definition: ltitoken.php:49
+ Here is the call graph for this function:

◆ disableNotes()

ilObjBlogGUI::disableNotes ( bool  $a_value = false)

Definition at line 2441 of file class.ilObjBlogGUI.php.

2441  : void
2442  {
2443  $this->disable_notes = $a_value;
2444  }

◆ executeCommand()

ilObjBlogGUI::executeCommand ( )

Definition at line 546 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, $disable_notes, $gtp, ilObject2GUI\$lng, $nav_history, $tabs, ilObject2GUI\$tpl, ilObjectGUI\addHeaderAction(), addHeaderActionForCommand(), buildEmbedded(), ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilBlogPosting\exists(), filterInactivePostings(), ilObject2GUI\getAccessHandler(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreenForward(), ilObjBlogAccess\isCommentsExportPossible(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\loadStandardTemplate(), mayContribute(), mayEditPosting(), ILIAS\Repository\object(), ilObject2GUI\prepareOutput(), preview(), renderFullScreen(), renderNavigation(), renderToolbarNavigation(), ilGlobalTemplateInterface\setContent(), setContentStyleSheet(), ilObject2GUI\setLocator(), ilGlobalTemplateInterface\setRightContent(), setSettingsSubTabs(), setTabs(), ILIAS\Repository\tabs(), triggerAssignmentTool(), and ilLanguage\txt().

546  : void
547  {
548  $ilCtrl = $this->ctrl;
549  $tpl = $this->tpl;
550  $ilTabs = $this->tabs;
551  $lng = $this->lng;
552  $ilNavigationHistory = $this->nav_history;
553 
554 
555  $next_class = $ilCtrl->getNextClass($this);
556 
557  if ($next_class !== "ilexportgui") {
558  $this->triggerAssignmentTool();
559  }
560 
561  // goto link to blog posting
562  if ($this->gtp > 0) {
563  $page_id = $this->gtp;
564  if (ilBlogPosting::exists($this->object_id, $page_id)) {
565  // #12312
566  $ilCtrl->setCmdClass("ilblogpostinggui");
567  $ilCtrl->setParameterByClass("ilblogpostinggui", "blpg", $page_id);
568  if ($this->edt === "edit") {
569  $ilCtrl->redirectByClass("ilblogpostinggui", "edit");
570  } else {
571  $ilCtrl->redirectByClass("ilblogpostinggui", "previewFullscreen");
572  }
573  } else {
574  $this->tpl->setOnScreenMessage('failure', $lng->txt("blog_posting_not_found"));
575  }
576  }
577 
578 
579  $cmd = $ilCtrl->getCmd();
580 
581  // add entry to navigation history
582  if (($this->id_type === self::REPOSITORY_NODE_ID) && !$this->getCreationMode() &&
583  $this->getAccessHandler()->checkAccess("read", "", $this->node_id)) {
584  // see #22067
585  $link = $ilCtrl->getLinkTargetByClass(["ilrepositorygui", "ilObjBlogGUI"], "preview");
586  $ilNavigationHistory->addItem($this->node_id, $link, "blog");
587  }
588  switch ($next_class) {
589  case 'ilblogpostinggui':
590  $this->ctrl->saveParameter($this, "user_page");
591  if (!$this->prtf_embed) {
593  }
594 
595  if (!$this->checkPermissionBool("read") && !$this->prtf_embed) {
596  $this->tpl->setOnScreenMessage('info', $lng->txt("no_permission"));
597  return;
598  }
599 
600  // #9680
601  if ($this->id_type === self::REPOSITORY_NODE_ID) {
602  $this->setLocator();
603  }
604 
605  $style_sheet_id = $this->content_style_domain->getEffectiveStyleId();
606 
607  $bpost_gui = new ilBlogPostingGUI(
608  $this->node_id,
609  $this->getAccessHandler(),
610  $this->blpg,
611  $this->old_nr,
612  ($this->object->getNotesStatus() && !$this->disable_notes),
613  $this->mayEditPosting($this->blpg),
614  $style_sheet_id
615  );
616 
617  // keep preview mode through notes gui (has its own commands)
618  switch ($cmd) {
619  // blog preview
620  case "previewFullscreen":
621  $ilCtrl->setParameter($this, "prvm", "fsc");
622  break;
623 
624  // blog in portfolio
625  case "previewEmbedded":
626  $ilCtrl->setParameter($this, "prvm", "emb");
627  break;
628 
629  // edit
630  default:
631  $this->setContentStyleSheet();
632 
633 
634  if (!$this->prtf_embed) {
635  $this->ctrl->setParameterByClass("ilblogpostinggui", "blpg", $this->blpg);
636  $this->tabs_gui->addNonTabbedLink(
637  "preview",
638  $lng->txt("blog_preview"),
639  $this->ctrl->getLinkTargetByClass("ilblogpostinggui", "previewFullscreen")
640  );
641  $this->ctrl->setParameterByClass("ilblogpostinggui", "blpg", "");
642  } else {
643  $this->ctrl->setParameterByClass("ilobjportfoliogui", "user_page", $this->ppage);
644  $this->tabs_gui->addNonTabbedLink(
645  "preview",
646  $lng->txt("blog_preview"),
647  $this->ctrl->getLinkTargetByClass("ilobjportfoliogui", "preview")
648  );
649  $this->ctrl->setParameterByClass("ilobjportfoliogui", "user_page", "");
650  }
651  break;
652  }
653 
654  // keep preview mode through notes gui
655  if ($this->prvm) {
656  $cmd = "preview" . (($this->prvm === "fsc") ? "Fullscreen" : "Embedded");
657  }
658  if (in_array($cmd, array("previewFullscreen", "previewEmbedded"))) {
659  $this->renderToolbarNavigation($this->items, true);
660  }
661  $ret = $ilCtrl->forwardCommand($bpost_gui);
662  if (!$ilTabs->back_target) {
663  $ilCtrl->setParameter($this, "bmn", "");
664  $ilTabs->setBackTarget(
665  $lng->txt("back"),
666  $ilCtrl->getLinkTarget($this, "")
667  );
668  }
669 
670  if ($ret != "") {
671 
672  // $is_owner = $this->object->getOwner() == $ilUser->getId();
673  $is_owner = $this->mayContribute();
674  $is_active = $bpost_gui->getBlogPosting()->getActive();
675 
676  // do not show inactive postings
677  if (($cmd === "previewFullscreen" || $cmd === "previewEmbedded")
678  && !$is_owner && !$is_active) {
679  $this->ctrl->redirect($this, "preview");
680  }
681 
682  switch ($cmd) {
683  // blog preview
684  case "previewFullscreen":
685  $this->addHeaderActionForCommand($cmd);
686  $this->filterInactivePostings();
687  $nav = $this->renderNavigation("preview", $cmd);
688  $this->renderFullScreen($ret, $nav);
689  break;
690 
691  // blog in portfolio
692  case "previewEmbedded":
693  $this->addHeaderActionForCommand($cmd);
694  $this->filterInactivePostings();
695  $nav = $this->renderNavigation("gethtml", $cmd);
696  // this is important for embedded blog pages!
697  $this->rendered_content = $this->buildEmbedded($ret, $nav);
698  return;
699 
700  // ilias/editor
701  default:
702  // infos about draft status / snippet
703  $info = array();
704  if (!$is_active) {
705  // single author blog (owner) in personal workspace
706  if ($this->id_type === self::WORKSPACE_NODE_ID) {
707  $info[] = $lng->txt("blog_draft_info");
708  } else {
709  $info[] = $lng->txt("blog_draft_info_contributors");
710  }
711  }
712  $public_action = false;
713  if ($cmd !== "history" && $cmd !== "edit" && $is_active && empty($info)) {
714  $info[] = $lng->txt("blog_new_posting_info");
715  $public_action = true;
716  }
717  if ($this->object->hasApproval() && !$bpost_gui->getBlogPosting()->isApproved()) {
718  // #9737
719  $info[] = $lng->txt("blog_posting_edit_approval_info");
720  }
721  if ($public_action) {
722  $this->tpl->setOnScreenMessage('success', implode("<br />", $info));
723  } else {
724  if (count($info) > 0) {
725  $this->tpl->setOnScreenMessage('info', implode("<br />", $info));
726  }
727  }
728 
729  // revert to edit cmd to avoid confusion
730  $tpl->setContent($ret);
731  if ($cmd !== "edit") {
732  $this->addHeaderActionForCommand("render");
733  $nav = $this->renderNavigation("render", $cmd, "", $is_owner);
734  $tpl->setRightContent($nav);
735  } else {
736  $this->tabs->setBackTarget("", "");
737  }
738  break;
739  }
740  }
741  break;
742 
743  case "ilinfoscreengui":
744  $this->prepareOutput();
745  $this->addHeaderActionForCommand("render");
746  $this->infoScreenForward();
747  break;
748 
749  case "ilnotegui":
750  $this->preview();
751  break;
752 
753  case "ilcommonactiondispatchergui":
755  $gui->enableCommentsSettings(false);
756  $this->prepareOutput();
757  $this->ctrl->forwardCommand($gui);
758  break;
759 
760  case "ilpermissiongui":
761  $this->prepareOutput();
762  $ilTabs->activateTab("id_permissions");
763  $perm_gui = new ilPermissionGUI($this);
764  $this->ctrl->forwardCommand($perm_gui);
765  break;
766 
767  case "ilobjectcopygui":
768  $this->prepareOutput();
769  $cp = new ilObjectCopyGUI($this);
770  $cp->setType("blog");
771  $this->ctrl->forwardCommand($cp);
772  break;
773 
774  case 'ilrepositorysearchgui':
775  $this->prepareOutput();
776  $ilTabs->activateTab("contributors");
777  $rep_search = new ilRepositorySearchGUI();
778  $rep_search->setTitle($this->lng->txt("blog_add_contributor"));
779  $rep_search->setCallback($this, 'addContributor', $this->object->getAllLocalRoles($this->node_id));
780  $this->ctrl->setReturn($this, 'contributors');
781  $this->ctrl->forwardCommand($rep_search);
782  break;
783 
784  case 'ilexportgui':
785  $this->prepareOutput();
786  $ilTabs->activateTab("export");
787  $exp_gui = new ilExportGUI($this);
788  $exp_gui->addFormat("xml");
789  $exp_gui->addFormat("html", "", $this, "buildExportFile"); // #13419
790  if (ilObjBlogAccess::isCommentsExportPossible($this->object->getId())) {
791  $exp_gui->addFormat("html_comments", "HTML (" . $this->lng->txt("blog_incl_comments") . ")", $this, "buildExportFile");
792  }
793  $ilCtrl->forwardCommand($exp_gui);
794  break;
795 
796  case "ilobjectcontentstylesettingsgui":
797  $this->checkPermission("write");
798  $this->prepareOutput();
799  $this->addHeaderAction();
800  $ilTabs->activateTab("settings");
801  $this->setSettingsSubTabs("style");
802 
803 
804  if ($this->id_type === self::REPOSITORY_NODE_ID) {
805  $settings_gui = $this->content_style_gui
806  ->objectSettingsGUIForRefId(
807  null,
808  $this->object->getRefId()
809  );
810  } else {
811  $settings_gui = $this->content_style_gui
812  ->objectSettingsGUIForObjId(
813  null,
814  $this->object->getId()
815  );
816  }
817  $this->ctrl->forwardCommand($settings_gui);
818  break;
819 
820 
821  case "ilblogexercisegui":
822  $this->ctrl->setReturn($this, "render");
823  $gui = new ilBlogExerciseGUI($this->node_id);
824  $this->ctrl->forwardCommand($gui);
825  break;
826 
827  case 'ilobjnotificationsettingsgui':
828  $this->prepareOutput();
829  $ilTabs->activateTab("settings");
830  $this->setSettingsSubTabs("notifications");
831  $gui = new ilObjNotificationSettingsGUI($this->object->getRefId());
832  $this->ctrl->forwardCommand($gui);
833  break;
834 
835  default:
836  if ($cmd !== "gethtml") {
837  // desktop item handling, must be toggled before header action
838  if ($cmd === "addToDesk" || $cmd === "removeFromDesk") {
839  $this->{$cmd . "Object"}();
840  if ($this->prvm) {
841  $cmd = "preview";
842  } else {
843  $cmd = "render";
844  }
845  $ilCtrl->setCmd($cmd);
846  }
847  $this->addHeaderActionForCommand($cmd);
848  }
849  if (!$this->prtf_embed) {
850  parent::executeCommand();
851  return;
852  }
853 
854  $this->setTabs();
855 
856  if (!$cmd) {
857  $cmd = "render";
858  }
859  $this->rendered_content = (string) $this->$cmd();
860  }
861  }
ilNavigationHistory $nav_history
setLocator()
set Locator
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
filterInactivePostings()
Filter inactive items from items list.
mayContribute()
Check if user may contribute at all.
preview()
Render fullscreen presentation.
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...
GUI class for the workflow of copying objects.
addHeaderActionForCommand(string $a_cmd)
Class ilBlogPosting GUI class.
static exists(int $a_blog_id, int $a_posting_id)
Checks whether a posting exists.
setContentStyleSheet(ilGlobalTemplateInterface $a_tpl=null)
prepareOutput(bool $show_sub_objects=true)
renderFullScreen(string $a_content, string $a_navigation)
Build fullscreen context.
Class ilBlogExerciseGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
setContent(string $a_html)
Sets content for standard template.
static isCommentsExportPossible(int $blog_id)
ilGlobalTemplateInterface $tpl
mayEditPosting(int $a_posting_id, int $a_author_id=null)
Check if user may edit posting.
loadStandardTemplate()
This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STA...
setSettingsSubTabs(string $a_active)
renderNavigation(string $a_list_cmd="render", string $a_posting_cmd="preview", string $a_link_template=null, bool $a_show_inactive=false, int $a_blpg=0)
Build navigation blocks.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRightContent(string $a_html)
Sets content of right column.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
renderToolbarNavigation(array $a_items, bool $single_posting=false)
Toolbar navigation.
buildEmbedded(string $a_content, string $a_nav)
Combine content (list/posting) and navigation to html chunk.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ export()

ilObjBlogGUI::export ( bool  $a_with_comments = false)

Build and deliver export file.

Definition at line 1165 of file class.ilObjBlogGUI.php.

References buildExportFile(), ilFileDelivery\deliverFileLegacy(), and ILIAS\Repository\object().

Referenced by exportWithComments().

1167  : void {
1168  $zip = $this->buildExportFile($a_with_comments);
1169  ilFileDelivery::deliverFileLegacy($zip, $this->object->getTitle() . ".zip", '', false, true);
1170  }
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
buildExportFile(bool $a_include_comments=false, bool $print_version=false)
Build export file.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exportWithComments()

ilObjBlogGUI::exportWithComments ( )
protected

Handle export choice.

Definition at line 2975 of file class.ilObjBlogGUI.php.

References ilObjectGUI\$object, $provider, ILIAS\Repository\ctrl(), export(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

2975  : void
2976  {
2977  $this->export(true);
2978  }
export(bool $a_with_comments=false)
Build and deliver export file.
+ Here is the call graph for this function:

◆ filterInactivePostings()

ilObjBlogGUI::filterInactivePostings ( )
protected

Filter inactive items from items list.

Definition at line 2589 of file class.ilObjBlogGUI.php.

References ilObjectGUI\$id, $keys, ilPageObject\_lookupActive(), and ILIAS\Repository\object().

Referenced by executeCommand(), getHTML(), and preview().

2589  : void
2590  {
2591  foreach ($this->items as $month => $postings) {
2592  foreach ($postings as $id => $item) {
2593  if (!ilBlogPosting::_lookupActive($id, "blp")) {
2594  unset($this->items[$month][$id]);
2595  } elseif ($this->object->hasApproval() && !$item["approved"]) {
2596  unset($this->items[$month][$id]);
2597  }
2598  }
2599  if (!count($this->items[$month])) {
2600  unset($this->items[$month]);
2601  }
2602  }
2603 
2604  if ($this->items && !isset($this->items[$this->month])) {
2605  $keys = array_keys($this->items);
2606  $this->month = array_shift($keys);
2607  }
2608  }
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
$keys
Definition: metadata.php:204
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ filterItemsByKeyword()

ilObjBlogGUI::filterItemsByKeyword ( array  $a_items,
string  $a_keyword 
)

Definition at line 2610 of file class.ilObjBlogGUI.php.

References $res, and ilBlogPosting\getKeywords().

Referenced by getListItems().

2613  : array {
2614  $res = [];
2615  foreach ($a_items as $month => $items) {
2616  foreach ($items as $item) {
2617  if (in_array(
2618  $a_keyword,
2619  ilBlogPosting::getKeywords($this->obj_id, $item["id"])
2620  )) {
2621  $res[] = $item;
2622  }
2623  }
2624  }
2625  return $res;
2626  }
$res
Definition: ltiservices.php:69
static getKeywords(int $a_obj_id, int $a_posting_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forwardExport()

ilObjBlogGUI::forwardExport ( )
protected

Definition at line 3020 of file class.ilObjBlogGUI.php.

References ILIAS\Repository\ctrl().

3020  : void
3021  {
3022  $this->ctrl->redirectByClass(ilExportGUI::class);
3023  }
+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjBlogGUI::getEditFormCustomValues ( array &  $a_values)
protected

Definition at line 404 of file class.ilObjBlogGUI.php.

References ilObjBlog\ABSTRACT_DEFAULT_IMAGE_HEIGHT, ilObjBlog\ABSTRACT_DEFAULT_IMAGE_WIDTH, and ilObjBlog\ABSTRACT_DEFAULT_SHORTEN_LENGTH.

404  : void
405  {
406  if ($this->id_type === self::REPOSITORY_NODE_ID) {
407  $a_values["approval"] = $this->object->hasApproval();
408  $a_values["nav_authors"] = $this->object->hasAuthors();
409  }
410  $a_values["keywords"] = $this->object->hasKeywords();
411  $a_values["notes"] = $this->object->getNotesStatus();
412  $a_values["ppic"] = $this->object->hasProfilePicture();
413  /*
414  $a_values["bg_color"] = $this->object->getBackgroundColor();
415  $a_values["font_color"] = $this->object->getFontColor();
416  */
417  $a_values["banner"] = $this->object->getImage();
418  $a_values["rss"] = $this->object->hasRSS();
419  $a_values["abss"] = $this->object->hasAbstractShorten();
420  $a_values["absi"] = $this->object->hasAbstractImage();
421  $a_values["nav"] = $this->object->getNavMode();
422  $a_values["nav_list_mon_with_post"] = $this->object->getNavModeListMonthsWithPostings();
423  $a_values["nav_list_mon"] = $this->object->getNavModeListMonths();
424  $a_values["ov_list_post_num"] = $this->object->getOverviewPostings();
425 
426  // #13420
427  $a_values["abssl"] = $this->object->getAbstractShortenLength() ?: ilObjBlog::ABSTRACT_DEFAULT_SHORTEN_LENGTH;
428  $a_values["absiw"] = $this->object->getAbstractImageWidth() ?: ilObjBlog::ABSTRACT_DEFAULT_IMAGE_WIDTH;
429  $a_values["absih"] = $this->object->getAbstractImageHeight() ?: ilObjBlog::ABSTRACT_DEFAULT_IMAGE_HEIGHT;
430  $a_values = $this->reading_time_gui->addValueToArray($a_values);
431  }
const ABSTRACT_DEFAULT_IMAGE_WIDTH
const ABSTRACT_DEFAULT_SHORTEN_LENGTH
const ABSTRACT_DEFAULT_IMAGE_HEIGHT

◆ getHTML()

ilObjBlogGUI::getHTML ( )

Return embeddable HTML chunk.

Definition at line 1049 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, $ilUser, ilObject2GUI\$lng, ilObject2GUI\$user, ilObject\_lookupOwner(), buildEmbedded(), filterInactivePostings(), getListItems(), ILIAS\Repository\lng(), renderList(), renderNavigation(), ILIAS\Repository\toolbar(), and ILIAS\Repository\ui().

1049  : string
1050  {
1051  $ilUser = $this->user;
1052  $ilCtrl = $this->ctrl;
1053  $lng = $this->lng;
1054 
1055  // getHTML() is called by ilRepositoryGUI::show()
1056  if ($this->id_type === self::REPOSITORY_NODE_ID) {
1057  return "";
1058  }
1059 
1060  // there is no way to do a permissions check here, we have no wsp
1061 
1062  $this->filterInactivePostings();
1063 
1064  $list_items = $this->getListItems();
1065 
1066  $list = $nav = "";
1067  if ($list_items) {
1068  $list = $this->renderList($list_items, "previewEmbedded");
1069  $nav = $this->renderNavigation("gethtml", "previewEmbedded");
1070  }
1071  // quick editing in portfolio
1072  elseif ($this->prt_id) {
1073  // see renderList()
1074  if (ilObject::_lookupOwner($this->prt_id) === $ilUser->getId()) {
1075  // see ilPortfolioPageTableGUI::fillRow()
1076  $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", $this->user_page);
1077  $link = $ilCtrl->getLinkTargetByClass(array("ilportfoliopagegui", "ilobjbloggui"), "render");
1078  $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", "");
1079 
1080  $this->toolbar->addComponent($this->ui->factory()->button()->standard(
1081  $this->lng->txt("blog_edit"),
1082  $link
1083  ));
1084  }
1085  }
1086 
1087  return $this->buildEmbedded($list, $nav);
1088  }
filterInactivePostings()
Filter inactive items from items list.
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
getListItems(bool $a_show_inactive=false)
Filter blog postings by month, keyword or author.
renderNavigation(string $a_list_cmd="render", string $a_posting_cmd="preview", string $a_link_template=null, bool $a_show_inactive=false, int $a_blpg=0)
Build navigation blocks.
$ilUser
Definition: imgupload.php:34
buildEmbedded(string $a_content, string $a_nav)
Combine content (list/posting) and navigation to html chunk.
renderList(array $items, string $a_cmd="preview", string $a_link_template="", bool $a_show_inactive=false, string $a_export_directory="")
Build posting month list.
+ Here is the call graph for this function:

◆ getItems()

ilObjBlogGUI::getItems ( )

Definition at line 162 of file class.ilObjBlogGUI.php.

References $items.

162  : array
163  {
164  return $this->items;
165  }

◆ getKeywords()

ilObjBlogGUI::getKeywords ( bool  $a_show_inactive,
?int  $a_posting_id = null 
)

Get keywords for single posting or complete blog.

Definition at line 2364 of file class.ilObjBlogGUI.php.

References $keyword, ilPageObject\_lookupActive(), ilBlogPosting\getKeywords(), and ilArrayUtil\sortArray().

Referenced by buildExportLink(), and renderNavigationByKeywords().

2367  : array {
2368  $keywords = array();
2369  if ($a_posting_id) {
2370  foreach (ilBlogPosting::getKeywords($this->obj_id, $a_posting_id) as $keyword) {
2371  if (isset($keywords[$keyword])) {
2372  $keywords[$keyword]++;
2373  } else {
2374  $keywords[$keyword] = 1;
2375  }
2376  }
2377  } else {
2378  foreach ($this->items as $month => $items) {
2379  foreach ($items as $item) {
2380  if ($a_show_inactive || ilBlogPosting::_lookupActive($item["id"], "blp")) {
2381  foreach (ilBlogPosting::getKeywords($this->obj_id, $item["id"]) as $keyword) {
2382  if (isset($keywords[$keyword])) {
2383  $keywords[$keyword]++;
2384  } else {
2385  $keywords[$keyword] = 1;
2386  }
2387  }
2388  }
2389  }
2390  }
2391  }
2392 
2393  // #15881
2394  $tmp = array();
2395  foreach ($keywords as $keyword => $counter) {
2396  $tmp[] = array("keyword" => $keyword, "counter" => $counter);
2397  }
2398  $tmp = ilArrayUtil::sortArray($tmp, "keyword", "ASC");
2399 
2400  $keywords = array();
2401  foreach ($tmp as $item) {
2402  $keywords[(string) $item["keyword"]] = $item["counter"];
2403  }
2404  return $keywords;
2405  }
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
static getKeywords(int $a_obj_id, int $a_posting_id)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLatestMonth()

ilObjBlogGUI::getLatestMonth ( array  $a_items)
Parameters
array$a_itemsitem array

Definition at line 2173 of file class.ilObjBlogGUI.php.

Referenced by renderToolbarNavigation().

2175  : string {
2176  reset($a_items);
2177  return key($a_items);
2178  }
+ Here is the caller graph for this function:

◆ getLatestPosting()

ilObjBlogGUI::getLatestPosting ( array  $a_items)

Get previous posting.

Parameters
array$a_itemsitem array
Returns
int page id

Definition at line 2233 of file class.ilObjBlogGUI.php.

Referenced by renderToolbarNavigation().

2235  : int {
2236  reset($a_items);
2237  $month = current($a_items);
2238  if (is_array($month)) {
2239  return (int) current($month)["id"];
2240  }
2241  return 0;
2242  }
+ Here is the caller graph for this function:

◆ getListItems()

ilObjBlogGUI::getListItems ( bool  $a_show_inactive = false)
protected

Filter blog postings by month, keyword or author.

Definition at line 1093 of file class.ilObjBlogGUI.php.

References ilObjectGUI\$id, $month, ilPageObject\_lookupActive(), and filterItemsByKeyword().

Referenced by getHTML(), preview(), and render().

1095  : array {
1096  if ($this->author) {
1097  $list_items = array();
1098  foreach ($this->items as $month => $items) {
1099  foreach ($items as $id => $item) {
1100  if ($item["author"] == $this->author ||
1101  (isset($item["editors"]) && in_array($this->author, $item["editors"]))) {
1102  $list_items[$id] = $item;
1103  }
1104  }
1105  }
1106  } elseif ($this->keyword) {
1107  $list_items = $this->filterItemsByKeyword($this->items, $this->keyword);
1108  } else {
1109  $max = $this->object->getOverviewPostings();
1110  if ($this->month_default && $max) {
1111  $list_items = array();
1112  foreach ($this->items as $month => $postings) {
1113  foreach ($postings as $id => $item) {
1114  if (!$a_show_inactive &&
1115  !ilBlogPosting::_lookupActive($id, "blp")) {
1116  continue;
1117  }
1118  $list_items[$id] = $item;
1119 
1120  if (count($list_items) >= $max) {
1121  break(2);
1122  }
1123  }
1124  }
1125  } else {
1126  $list_items = $this->items[$this->month] ?? [];
1127  }
1128  }
1129  return $list_items;
1130  }
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
filterItemsByKeyword(array $a_items, string $a_keyword)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNextMonth()

ilObjBlogGUI::getNextMonth ( array  $a_items)

Get next month.

Definition at line 2144 of file class.ilObjBlogGUI.php.

References $month.

Referenced by renderToolbarNavigation().

2146  : string {
2147  reset($a_items);
2148  $found = "";
2149  foreach ($a_items as $month => $items) {
2150  if ($month > $this->month) {
2151  $found = $month;
2152  }
2153  }
2154  return $found;
2155  }
+ Here is the caller graph for this function:

◆ getNextPosting()

ilObjBlogGUI::getNextPosting ( array  $a_items)

Get next posting.

Parameters
array$a_itemsitem array
Returns
int page id

Definition at line 2185 of file class.ilObjBlogGUI.php.

References ILIAS\Repository\int().

Referenced by renderToolbarNavigation().

2187  : int {
2188  reset($a_items);
2189  $found = "";
2190  $next_blpg = 0;
2191  foreach ($a_items as $month => $items) {
2192  foreach ($items as $item) {
2193  if ($item["id"] == $this->blpg) {
2194  $found = true;
2195  }
2196  if (!$found) {
2197  $next_blpg = (int) $item["id"];
2198  }
2199  }
2200  }
2201  return $next_blpg;
2202  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNotesSubId()

ilObjBlogGUI::getNotesSubId ( )

Definition at line 2436 of file class.ilObjBlogGUI.php.

References $blpg.

2436  : int
2437  {
2438  return $this->blpg;
2439  }

◆ getPreviousMonth()

ilObjBlogGUI::getPreviousMonth ( array  $a_items)

Definition at line 2157 of file class.ilObjBlogGUI.php.

References $month.

Referenced by renderToolbarNavigation().

2159  : string {
2160  reset($a_items);
2161  $found = "";
2162  foreach ($a_items as $month => $items) {
2163  if ($month < $this->month && $found === "") {
2164  $found = $month;
2165  }
2166  }
2167  return $found;
2168  }
+ Here is the caller graph for this function:

◆ getPreviousPosting()

ilObjBlogGUI::getPreviousPosting ( array  $a_items)

Get previous posting.

Parameters
array$a_itemsitem array
Returns
int page id

Definition at line 2209 of file class.ilObjBlogGUI.php.

References $blpg, and ILIAS\Repository\int().

Referenced by renderToolbarNavigation().

2211  : int {
2212  reset($a_items);
2213  $found = "";
2214  $prev_blpg = 0;
2215  foreach ($a_items as $month => $items) {
2216  foreach ($items as $item) {
2217  if ($found && $prev_blpg === 0) {
2218  $prev_blpg = (int) $item["id"];
2219  }
2220  if ((int) $item["id"] === $this->blpg) {
2221  $found = true;
2222  }
2223  }
2224  }
2225  return $prev_blpg;
2226  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRenderedContent()

ilObjBlogGUI::getRenderedContent ( )

Definition at line 863 of file class.ilObjBlogGUI.php.

References $rendered_content.

863  : string
864  {
866  }

◆ getType()

ilObjBlogGUI::getType ( )

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

Referenced by renderList().

157  : string
158  {
159  return "blog";
160  }
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjBlogGUI::infoScreen ( )

this one is called from the info button in the repository

Definition at line 889 of file class.ilObjBlogGUI.php.

References ILIAS\Repository\ctrl(), and infoScreenForward().

889  : void
890  {
891  $this->ctrl->setCmd("showSummary");
892  $this->ctrl->setCmdClass("ilinfoscreengui");
893  $this->infoScreenForward();
894  }
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjBlogGUI::infoScreenForward ( )

Definition at line 896 of file class.ilObjBlogGUI.php.

References $tabs, ilTabsGUI\activateTab(), ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObject2GUI\getPermanentLinkWidget(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by executeCommand(), and infoScreen().

896  : void
897  {
898  $ilTabs = $this->tabs;
899 
900  $ilTabs->activateTab("id_info");
901 
902  $this->checkPermission("visible");
903 
904  $info = new ilInfoScreenGUI($this);
905 
906  if ($this->id_type !== self::WORKSPACE_NODE_ID) {
907  $info->enablePrivateNotes();
908  }
909 
910  if ($this->checkPermissionBool("read")) {
911  $info->enableNews();
912  }
913 
914  // no news editing for files, just notifications
915  $info->enableNewsEditing(false);
916  if ($this->checkPermissionBool("write")) {
917  $news_set = new ilSetting("news");
918  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
919 
920  if ($enable_internal_rss) {
921  $info->setBlockProperty("news", "settings", true);
922  $info->setBlockProperty("news", "public_notifications_option", true);
923  }
924  }
925 
926  // standard meta data
927  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
928 
929  if ($this->id_type === self::WORKSPACE_NODE_ID) {
930  $info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
931  }
932 
933  $this->ctrl->forwardCommand($info);
934  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
Class ilInfoScreenGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
getPermanentLinkWidget(string $append=null, bool $center=false)
activateTab(string $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjBlogGUI::initCreationForms ( string  $new_type)
protected

Definition at line 168 of file class.ilObjBlogGUI.php.

168  : array
169  {
170  $forms = parent::initCreationForms($new_type);
171 
172  if ($this->id_type === self::WORKSPACE_NODE_ID) {
173  unset($forms[self::CFORM_IMPORT], $forms[self::CFORM_CLONE]);
174  }
175 
176  return $forms;
177  }

◆ initEditCustomForm()

ilObjBlogGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Definition at line 226 of file class.ilObjBlogGUI.php.

References $auth, $ilSetting, $img, ilObject2GUI\$lng, ilObjectGUI\$settings, ilPropertyFormGUI\addItem(), ilObjectGUI\getObjectService(), ilObjBlog\NAV_MODE_LIST, ilObjBlog\NAV_MODE_MONTH, ILIAS\Repository\object(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setMultiValues(), ilFormPropertyGUI\setRequired(), setSettingsSubTabs(), ilNumberInputGUI\setSize(), ilWACSignedPath\signFile(), and ilLanguage\txt().

228  : void {
229  $lng = $this->lng;
231  $obj_service = $this->getObjectService();
232 
233  $this->setSettingsSubTabs("properties");
234 
235  if ($this->id_type === self::REPOSITORY_NODE_ID) {
236  $appr = new ilCheckboxInputGUI($lng->txt("blog_enable_approval"), "approval");
237  $appr->setInfo($lng->txt("blog_enable_approval_info"));
238  $a_form->addItem($appr);
239  }
240 
241  $notes = new ilCheckboxInputGUI($lng->txt("blog_enable_notes"), "notes");
242  $a_form->addItem($notes);
243 
244  if ($ilSetting->get('enable_global_profiles')) {
245  $rss = new ilCheckboxInputGUI($lng->txt("blog_enable_rss"), "rss");
246  $rss->setInfo($lng->txt("blog_enable_rss_info"));
247  $a_form->addItem($rss);
248  }
249 
250 
251  // navigation
252 
253  $nav = new ilFormSectionHeaderGUI();
254  $nav->setTitle($lng->txt("blog_settings_navigation"));
255  $a_form->addItem($nav);
256 
257  $nav_mode = new ilRadioGroupInputGUI($lng->txt("blog_nav_mode"), "nav");
258  $nav_mode->setRequired(true);
259  $a_form->addItem($nav_mode);
260 
261  $opt = new ilRadioOption($lng->txt("blog_nav_mode_month_list"), ilObjBlog::NAV_MODE_LIST);
262  $opt->setInfo($lng->txt("blog_nav_mode_month_list_info"));
263  $nav_mode->addOption($opt);
264 
265 
266  $mon_num = new ilNumberInputGUI($lng->txt("blog_nav_mode_month_list_num_month"), "nav_list_mon");
267  $mon_num->setInfo($lng->txt("blog_nav_mode_month_list_num_month_info"));
268  $mon_num->setSize(3);
269  $mon_num->setMinValue(1);
270  $opt->addSubItem($mon_num);
271 
272  $detail_num = new ilNumberInputGUI($lng->txt("blog_nav_mode_month_list_num_month_with_post"), "nav_list_mon_with_post");
273  $detail_num->setInfo($lng->txt("blog_nav_mode_month_list_num_month_with_post_info"));
274  //$detail_num->setRequired(true);
275  $detail_num->setSize(3);
276  //$detail_num->setMinValue(0);
277  $opt->addSubItem($detail_num);
278 
279  $opt = new ilRadioOption($lng->txt("blog_nav_mode_month_single"), ilObjBlog::NAV_MODE_MONTH);
280  $opt->setInfo($lng->txt("blog_nav_mode_month_single_info"));
281  $nav_mode->addOption($opt);
282 
283  $order_options = array();
284  if ($this->object->getOrder()) {
285  foreach ($this->object->getOrder() as $item) {
286  $order_options[] = $lng->txt("blog_" . $item);
287  }
288  }
289 
290  if (!in_array($lng->txt("blog_navigation"), $order_options)) {
291  $order_options[] = $lng->txt("blog_navigation");
292  }
293 
294  if ($this->id_type === self::REPOSITORY_NODE_ID) {
295  if (!in_array($lng->txt("blog_authors"), $order_options)) {
296  $order_options[] = $lng->txt("blog_authors");
297  }
298 
299  $auth = new ilCheckboxInputGUI($lng->txt("blog_enable_nav_authors"), "nav_authors");
300  $auth->setInfo($lng->txt("blog_enable_nav_authors_info"));
301  $a_form->addItem($auth);
302  }
303 
304  $keyw = new ilCheckboxInputGUI($lng->txt("blog_enable_keywords"), "keywords");
305  $keyw->setInfo($lng->txt("blog_enable_keywords_info"));
306  $a_form->addItem($keyw);
307 
308  if (!in_array($lng->txt("blog_keywords"), $order_options)) {
309  $order_options[] = $lng->txt("blog_keywords");
310  }
311 
312  $order = new ilNonEditableValueGUI($lng->txt("blog_nav_sortorder"), "order");
313  $order->setMultiValues($order_options);
314  $order->setValue(array_shift($order_options));
315  $order->setMulti(true, true, false);
316  $a_form->addItem($order);
317 
318 
319  // presentation (frame)
320 
321  $pres = new ilFormSectionHeaderGUI();
322  $pres->setTitle($lng->txt("blog_presentation_frame"));
323  $a_form->addItem($pres);
324 
325  if ($this->id_type === self::REPOSITORY_NODE_ID) {
326  $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
327  }
328 
329  $ppic = new ilCheckboxInputGUI($lng->txt("blog_profile_picture"), "ppic");
330  $a_form->addItem($ppic);
331 
332  if ($this->id_type === self::REPOSITORY_NODE_ID) {
333  $ppic->setInfo($lng->txt("blog_profile_picture_repository_info"));
334  }
335 
336  $blga_set = new ilSetting("blga");
337  if ($blga_set->get("banner")) {
338  $dimensions = " (" . $blga_set->get("banner_width") . "x" .
339  $blga_set->get("banner_height") . ")";
340 
341  $img = new ilImageFileInputGUI($lng->txt("blog_banner") . $dimensions, "banner");
342  $a_form->addItem($img);
343 
344  // show existing file
345  $file = $this->object->getImageFullPath(true);
346  if ($file) {
347  $img->setImage(ilWACSignedPath::signFile($file));
348  }
349  }
350 
351  $this->reading_time_gui->addSettingToForm($a_form);
352 
353  /* #15000
354  $bg_color = new ilColorPickerInputGUI($lng->txt("blog_background_color"), "bg_color");
355  $a_form->addItem($bg_color);
356 
357  $font_color = new ilColorPickerInputGUI($lng->txt("blog_font_color"), "font_color");
358  $a_form->addItem($font_color);
359  */
360 
361  // presentation (overview)
362 
363  $list = new ilFormSectionHeaderGUI();
364  $list->setTitle($lng->txt("blog_presentation_overview"));
365  $a_form->addItem($list);
366 
367 
368  $post_num = new ilNumberInputGUI($lng->txt("blog_list_num_postings"), "ov_list_post_num");
369  $post_num->setInfo($lng->txt("blog_list_num_postings_info"));
370  $post_num->setSize(3);
371  $post_num->setMinValue(1);
372  $post_num->setRequired(true);
373  $a_form->addItem($post_num);
374 
375  $abs_shorten = new ilCheckboxInputGUI($lng->txt("blog_abstract_shorten"), "abss");
376  $a_form->addItem($abs_shorten);
377 
378  $abs_shorten_len = new ilNumberInputGUI($lng->txt("blog_abstract_shorten_length"), "abssl");
379  $abs_shorten_len->setSize(5);
380  $abs_shorten_len->setRequired(true);
381  $abs_shorten_len->setSuffix($lng->txt("blog_abstract_shorten_characters"));
382  $abs_shorten_len->setMinValue(50, true);
383  $abs_shorten->addSubItem($abs_shorten_len);
384 
385  $abs_img = new ilCheckboxInputGUI($lng->txt("blog_abstract_image"), "absi");
386  $abs_img->setInfo($lng->txt("blog_abstract_image_info"));
387  $a_form->addItem($abs_img);
388 
389  $abs_img_width = new ilNumberInputGUI($lng->txt("blog_abstract_image_width"), "absiw");
390  $abs_img_width->setSize(5);
391  $abs_img_width->setRequired(true);
392  $abs_img_width->setSuffix($lng->txt("blog_abstract_image_pixels"));
393  $abs_img_width->setMinValue(32, true);
394  $abs_img->addSubItem($abs_img_width);
395 
396  $abs_img_height = new ilNumberInputGUI($lng->txt("blog_abstract_image_height"), "absih");
397  $abs_img_height->setSize(5);
398  $abs_img_height->setRequired(true);
399  $abs_img_height->setSuffix($lng->txt("blog_abstract_image_pixels"));
400  $abs_img_height->setMinValue(32, true);
401  $abs_img->addSubItem($abs_img_height);
402  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setInfo(string $a_info)
This class represents a checkbox property in a property form.
const NAV_MODE_LIST
setMultiValues(array $a_values)
$auth
Definition: metadata.php:76
This class represents a property in a property form.
This class represents a number property in a property form.
setSettingsSubTabs(string $a_active)
setRequired(bool $a_required)
$img
Definition: imgupload.php:83
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $ilSetting
Definition: privfeed.php:17
static signFile(string $path_to_file)
const NAV_MODE_MONTH
ilSetting $settings
ILIAS Notes Service $notes
+ Here is the call graph for this function:

◆ initHeaderAction()

ilObjBlogGUI::initHeaderAction ( ?string  $sub_type = null,
?int  $sub_id = null,
bool  $is_preview = false 
)
protected

Definition at line 2468 of file class.ilObjBlogGUI.php.

References $blpg, ilObject2GUI\$ctrl, $disable_notes, $ilUser, ilObjectGUI\$obj_id, ilObject2GUI\$user, ilUtil\getImagePath(), ilNotification\hasNotification(), ilNotification\hasOptOut(), ILIAS\Repository\lng(), mayContribute(), mayEditPosting(), ILIAS\Repository\object(), and ilNotification\TYPE_BLOG.

Referenced by addHeaderActionForCommand().

2472  : ?ilObjectListGUI {
2473  $ilUser = $this->user;
2474  $ilCtrl = $this->ctrl;
2475  if (!$this->obj_id) {
2476  return null;
2477  }
2478  $sub_type = $sub_id = null;
2479  if ($this->blpg > 0) {
2480  $sub_type = "blp";
2481  $sub_id = $this->blpg;
2482  }
2483 
2484  $lg = parent::initHeaderAction($sub_type, $sub_id);
2485  if (!$lg) {
2486  return null;
2487  }
2488  $lg->enableComments(false);
2489  $lg->enableNotes(false);
2490 
2491  if ($is_preview) {
2492  if ($this->blpg > 0) {
2493  if (($this->object->getNotesStatus() && !$this->disable_notes)) {
2494  $lg->enableComments(true);
2495  }
2496  $lg->enableNotes(true);
2497  }
2498  $lg->enableTags(false);
2499 
2500  if (!$this->prtf_embed) {
2502  $ilCtrl->setParameter($this, "ntf", 1);
2503  $link = $ilCtrl->getLinkTarget($this, "setNotification");
2504  $ilCtrl->setParameter($this, "ntf", "");
2505  if (ilNotification::hasOptOut($this->obj_id)) {
2506  $lg->addCustomCommand($link, "blog_notification_toggle_off");
2507  }
2508 
2509  $lg->addHeaderIcon(
2510  "not_icon",
2511  ilUtil::getImagePath("notification_on.svg"),
2512  $this->lng->txt("blog_notification_activated")
2513  );
2514  } else {
2515  $ilCtrl->setParameter($this, "ntf", 2);
2516  $link = $ilCtrl->getLinkTarget($this, "setNotification");
2517  $ilCtrl->setParameter($this, "ntf", "");
2518  $lg->addCustomCommand($link, "blog_notification_toggle_on");
2519 
2520  $lg->addHeaderIcon(
2521  "not_icon",
2522  ilUtil::getImagePath("notification_off.svg"),
2523  $this->lng->txt("blog_notification_deactivated")
2524  );
2525  }
2526  }
2527 
2528  // #11758
2529  if ($this->mayContribute()) {
2530  $ilCtrl->setParameter($this, "prvm", "");
2531 
2532  $ilCtrl->setParameter($this, "bmn", "");
2533  $ilCtrl->setParameter($this, "blpg", "");
2534  $link = $ilCtrl->getLinkTarget($this, "");
2535  $ilCtrl->setParameter($this, "blpg", $sub_id);
2536  $ilCtrl->setParameter($this, "bmn", $this->month);
2537  $lg->addCustomCommand($link, "blog_edit"); // #11868
2538 
2539  if ($sub_id && $this->mayEditPosting($sub_id)) {
2540  $link = $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "edit");
2541  $lg->addCustomCommand($link, "blog_edit_posting");
2542  }
2543 
2544  $ilCtrl->setParameter($this, "prvm", "fsc");
2545  }
2546 
2547  $ilCtrl->setParameter($this, "ntf", "");
2548  }
2549 
2550  return $lg;
2551  }
mayContribute()
Check if user may contribute at all.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
mayEditPosting(int $a_posting_id, int $a_author_id=null)
Check if user may edit posting.
$ilUser
Definition: imgupload.php:34
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
static hasOptOut(int $obj_id)
Is opt out (disable notification) allowed?
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAdmin()

ilObjBlogGUI::isAdmin ( )
protected

Check if user has admin access (approve, may edit & deactivate all postings)

Definition at line 2631 of file class.ilObjBlogGUI.php.

References ilObject2GUI\checkPermissionBool().

Referenced by approve(), and renderList().

2631  : bool
2632  {
2633  return ($this->checkPermissionBool("redact") ||
2634  $this->checkPermissionBool("write"));
2635  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupSubObjectTitle()

static ilObjBlogGUI::lookupSubObjectTitle ( int  $a_blog_id,
int  $a_posting_id 
)
static

Get title for blog posting (used in ilNotesGUI)

Definition at line 2574 of file class.ilObjBlogGUI.php.

References $post.

2577  : string {
2578  // page might be deleted, so setting halt on errors to false
2579  $post = new ilBlogPosting($a_posting_id);
2580  if ($post->getBlogId() === $a_blog_id) {
2581  return $post->getTitle();
2582  }
2583  return "";
2584  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$post
Definition: ltitoken.php:49

◆ mayContribute()

ilObjBlogGUI::mayContribute ( )
protected

Check if user may contribute at all.

Definition at line 2673 of file class.ilObjBlogGUI.php.

References ilObject2GUI\checkPermissionBool().

Referenced by executeCommand(), initHeaderAction(), render(), renderFullScreen(), renderToolbarNavigation(), and setTabs().

2673  : bool
2674  {
2675  // single author blog (owner) in personal workspace
2676  if ($this->id_type == self::WORKSPACE_NODE_ID) {
2677  return $this->checkPermissionBool("write");
2678  }
2679 
2680  return ($this->checkPermissionBool("redact") ||
2681  $this->checkPermissionBool("contribute"));
2682  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mayEditPosting()

ilObjBlogGUI::mayEditPosting ( int  $a_posting_id,
int  $a_author_id = null 
)
protected

Check if user may edit posting.

Definition at line 2640 of file class.ilObjBlogGUI.php.

References $ilUser, $post, ilObject2GUI\$user, and ilObject2GUI\checkPermissionBool().

Referenced by executeCommand(), initHeaderAction(), renderList(), renderNavigation(), and renderToolbarNavigation().

2643  : bool {
2644  $ilUser = $this->user;
2645 
2646  // single author blog (owner) in personal workspace
2647  if ($this->id_type === self::WORKSPACE_NODE_ID) {
2648  return $this->checkPermissionBool("write");
2649  }
2650 
2651  // repository blogs
2652 
2653  // redact allows to edit all postings
2654  if ($this->checkPermissionBool("redact")) {
2655  return true;
2656  }
2657 
2658  // contribute gives access to own postings
2659  if ($this->checkPermissionBool("contribute")) {
2660  // check owner of posting
2661  if (!$a_author_id) {
2662  $post = new ilBlogPosting($a_posting_id);
2663  $a_author_id = $post->getAuthor();
2664  }
2665  return $ilUser->getId() === $a_author_id;
2666  }
2667  return false;
2668  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
$ilUser
Definition: imgupload.php:34
$post
Definition: ltitoken.php:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ preview()

ilObjBlogGUI::preview ( )

Render fullscreen presentation.

Definition at line 1135 of file class.ilObjBlogGUI.php.

References $DIC, ilObject2GUI\$lng, ilObject2GUI\$toolbar, ilObject2GUI\checkPermissionBool(), filterInactivePostings(), getListItems(), renderFullScreen(), renderList(), renderNavigation(), renderToolbarNavigation(), and ilLanguage\txt().

Referenced by executeCommand().

1135  : void
1136  {
1137  global $DIC;
1138 
1139  $lng = $DIC->language();
1140  $toolbar = $DIC->toolbar();
1141 
1142  if (!$this->checkPermissionBool("read")) {
1143  $this->tpl->setOnScreenMessage('info', $lng->txt("no_permission"));
1144  return;
1145  }
1146 
1147  $this->filterInactivePostings();
1148 
1149  $list_items = $this->getListItems();
1150 
1151  $list = $nav = "";
1152  if ($list_items) {
1153  $list = $this->renderList($list_items, "previewFullscreen");
1154  $nav = $this->renderNavigation("preview", "previewFullscreen");
1155  $this->renderToolbarNavigation($this->items);
1156  $list .= $toolbar->getHTML();
1157  }
1158 
1159  $this->renderFullScreen($list, $nav);
1160  }
filterInactivePostings()
Filter inactive items from items list.
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...
renderFullScreen(string $a_content, string $a_navigation)
Build fullscreen context.
global $DIC
Definition: feed.php:28
ilToolbarGUI $toolbar
getListItems(bool $a_show_inactive=false)
Filter blog postings by month, keyword or author.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
renderNavigation(string $a_list_cmd="render", string $a_posting_cmd="preview", string $a_link_template=null, bool $a_show_inactive=false, int $a_blpg=0)
Build navigation blocks.
renderToolbarNavigation(array $a_items, bool $single_posting=false)
Toolbar navigation.
renderList(array $items, string $a_cmd="preview", string $a_link_template="", bool $a_show_inactive=false, string $a_export_directory="")
Build posting month list.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printPostings()

ilObjBlogGUI::printPostings ( )

Definition at line 3014 of file class.ilObjBlogGUI.php.

3014  : void
3015  {
3016  $print_view = $this->getPrintView();
3017  $print_view->sendPrintView();
3018  }

◆ printViewSelection()

ilObjBlogGUI::printViewSelection ( )

Definition at line 3008 of file class.ilObjBlogGUI.php.

3008  : void
3009  {
3010  $view = $this->getPrintView();
3011  $view->sendForm();
3012  }

◆ removeContributor()

ilObjBlogGUI::removeContributor ( )

Definition at line 2855 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, $rbacadmin, contributors(), ILIAS\Repository\ctrl(), ilRbacAdmin\deassignUser(), ILIAS\Repository\object(), and ilLanguage\txt().

2855  : void
2856  {
2857  $ilCtrl = $this->ctrl;
2858  $lng = $this->lng;
2860 
2861  $ids = $this->blog_request->getIds();
2862 
2863  if (count($ids) === 0) {
2864  $this->tpl->setOnScreenMessage('failure', $lng->txt("select_one"), true);
2865  $ilCtrl->redirect($this, "contributors");
2866  }
2867 
2868  // get contributor role
2869  $local_roles = array_keys($this->object->getAllLocalRoles($this->node_id));
2870  if (!$local_roles) {
2871  $this->tpl->setOnScreenMessage('failure', $lng->txt("missing_perm"));
2872  $this->contributors();
2873  return;
2874  }
2875 
2876  foreach ($ids as $user_id) {
2877  foreach ($local_roles as $role_id) {
2878  $rbacadmin->deassignUser($role_id, $user_id);
2879  }
2880  }
2881 
2882  $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
2883  $this->ctrl->redirect($this, "contributors");
2884  }
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...
ilRbacAdmin $rbacadmin
deassignUser(int $a_rol_id, int $a_usr_id)
Deassigns a user from a role.
+ Here is the call graph for this function:

◆ render()

ilObjBlogGUI::render ( )

Render object context.

Definition at line 968 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, $keys, ilObject2GUI\$lng, $tabs, ilObject2GUI\$tpl, $url, ilGlobalTemplateInterface\addOnLoadCode(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilSubmitButton\getInstance(), ilLinkButton\getInstance(), getListItems(), mayContribute(), renderList(), renderNavigation(), ilGlobalTemplateInterface\setContent(), setContentStyleSheet(), ilGlobalTemplateInterface\setRightContent(), and ilLanguage\txt().

968  : void
969  {
970  $tpl = $this->tpl;
971  $ilTabs = $this->tabs;
972  $ilCtrl = $this->ctrl;
973  $lng = $this->lng;
974  $ilToolbar = new ilToolbarGUI();
975 
976  if (!$this->checkPermissionBool("read")) {
977  $this->tpl->setOnScreenMessage('info', $lng->txt("no_permission"));
978  return;
979  }
980 
981  $ilTabs->activateTab("content");
982 
983  // toolbar
984  if ($this->mayContribute()) {
985  $ilToolbar->setFormAction($ilCtrl->getFormAction($this, "createPosting"));
986 
987  $title = new ilTextInputGUI($lng->txt("title"), "title");
988  $title->setSize(30);
989  $ilToolbar->addStickyItem($title, $lng->txt("title"));
991  document.getElementById('title').setAttribute('data-blog-input', 'posting-title');
992  document.getElementById('title').setAttribute('placeholder', ' ');
993  ");
994 
995  $button = ilSubmitButton::getInstance();
996  $button->setCaption("blog_add_posting");
997  $button->setCommand("createPosting");
998  $ilToolbar->addStickyItem($button);
999 
1000  // #18763
1001  $keys = array_keys($this->items);
1002  $first = array_shift($keys);
1003  if ($first != $this->month) {
1004  $ilToolbar->addSeparator();
1005 
1006  $ilCtrl->setParameter($this, "bmn", $first);
1007  $url = $ilCtrl->getLinkTarget($this, "");
1008  $ilCtrl->setParameter($this, "bmn", $this->month);
1009 
1010  $button = ilLinkButton::getInstance();
1011  $button->setCaption("blog_show_latest");
1012  $button->setUrl($url);
1013  $ilToolbar->addButtonInstance($button);
1014  }
1015 
1016  // print/pdf
1017  $print_view = $this->getPrintView();
1018  $modal_elements = $print_view->getModalElements(
1019  $this->ctrl->getLinkTarget(
1020  $this,
1021  "printViewSelection"
1022  )
1023  );
1024  $ilToolbar->addSeparator();
1025  $ilToolbar->addComponent($modal_elements->button);
1026  $ilToolbar->addComponent($modal_elements->modal);
1027  }
1028 
1029  // $is_owner = ($this->object->getOwner() == $ilUser->getId());
1030  $is_owner = $this->mayContribute();
1031 
1032  $list_items = $this->getListItems($is_owner);
1033 
1034  $list = $nav = "";
1035  if ($list_items) {
1036  $list = $this->renderList($list_items, "preview", "", $is_owner);
1037  $nav = $this->renderNavigation("render", "edit", "", $is_owner);
1038  }
1039 
1040  $this->setContentStyleSheet();
1041 
1042  $tpl->setContent($ilToolbar->getHTML() . $list);
1043  $tpl->setRightContent($nav);
1044  }
mayContribute()
Check if user may contribute at all.
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...
setContentStyleSheet(ilGlobalTemplateInterface $a_tpl=null)
getListItems(bool $a_show_inactive=false)
Filter blog postings by month, keyword or author.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
setContent(string $a_html)
Sets content for standard template.
$keys
Definition: metadata.php:204
ilGlobalTemplateInterface $tpl
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
renderNavigation(string $a_list_cmd="render", string $a_posting_cmd="preview", string $a_link_template=null, bool $a_show_inactive=false, int $a_blpg=0)
Build navigation blocks.
setRightContent(string $a_html)
Sets content of right column.
$url
renderList(array $items, string $a_cmd="preview", string $a_link_template="", bool $a_show_inactive=false, string $a_export_directory="")
Build posting month list.
+ Here is the call graph for this function:

◆ renderFullScreen()

ilObjBlogGUI::renderFullScreen ( string  $a_content,
string  $a_navigation 
)

Build fullscreen context.

Definition at line 1191 of file class.ilObjBlogGUI.php.

References $ilUser, ilObject2GUI\$locator, ilObject2GUI\$node_id, ilObject2GUI\$parent_id, $tabs, ilObject2GUI\$tpl, ilObjectGUI\$tree, ilObject2GUI\$user, ilLink\_getStaticLink(), ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ilTree\getParentId(), ILIAS\Repository\lng(), mayContribute(), renderFullscreenHeader(), ilGlobalTemplateInterface\setContent(), setContentStyleSheet(), ilGlobalTemplateInterface\setLocator(), and ilGlobalTemplateInterface\setRightContent().

Referenced by executeCommand(), and preview().

1194  : void {
1195  $tpl = $this->tpl;
1196  $ilUser = $this->user;
1197  $ilTabs = $this->tabs;
1198  $ilLocator = $this->locator;
1199 
1200  $owner = $this->object->getOwner();
1201 
1202  $ilTabs->clearTargets();
1203  $tpl->setLocator();
1204 
1205  $back_caption = "";
1206  $back = "";
1207 
1208  // back (edit)
1209  if ($owner === $ilUser->getId()) {
1210  // from shared/deeplink
1211  if ($this->id_type === self::WORKSPACE_NODE_ID) {
1212  $back = "ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace&wsp_id=" . $this->node_id;
1213  }
1214  // from editor (#10073)
1215  elseif ($this->mayContribute()) {
1216  $this->ctrl->setParameter($this, "prvm", "");
1217  if ($this->blpg === 0) {
1218  $back = $this->ctrl->getLinkTarget($this, "");
1219  } else {
1220  $this->ctrl->setParameterByClass("ilblogpostinggui", "bmn", $this->month);
1221  $this->ctrl->setParameterByClass("ilblogpostinggui", "blpg", $this->blpg);
1222  $back = $this->ctrl->getLinkTargetByClass("ilblogpostinggui", "preview");
1223  }
1224  $this->ctrl->setParameter($this, "prvm", $this->prvm);
1225  }
1226 
1227  $back_caption = $this->lng->txt("blog_back_to_blog_owner");
1228  }
1229  // back
1230  elseif ($ilUser->getId() && $ilUser->getId() !== ANONYMOUS_USER_ID) {
1231  // workspace (always shared)
1232  if ($this->id_type === self::WORKSPACE_NODE_ID) {
1233  $back = "ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace&dsh=" . $owner;
1234  }
1235  // contributor
1236  elseif ($this->mayContribute()) {
1237  $back = $this->ctrl->getLinkTarget($this, "");
1238  $back_caption = $this->lng->txt("blog_back_to_blog_owner");
1239  }
1240  // listgui / parent container
1241  else {
1242  $tree = $this->tree;
1243  $parent_id = $tree->getParentId($this->node_id);
1245  }
1246  }
1247 
1248  $this->renderFullscreenHeader($tpl, $owner);
1249 
1250  // #13564
1251  $this->ctrl->setParameter($this, "bmn", "");
1252  //$tpl->setTitleUrl($this->ctrl->getLinkTarget($this, "preview"));
1253  $this->ctrl->setParameter($this, "bmn", $this->month);
1254 
1255  $this->setContentStyleSheet();
1256 
1257  // content
1258  $tpl->setContent($a_content);
1259  $tpl->setRightContent($a_navigation);
1260  }
setLocator()
Insert locator.
mayContribute()
Check if user may contribute at all.
const ANONYMOUS_USER_ID
Definition: constants.php:27
setContentStyleSheet(ilGlobalTemplateInterface $a_tpl=null)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
getParentId(int $a_node_id)
get parent id of given node
renderFullscreenHeader(ilGlobalTemplateInterface $a_tpl, int $a_user_id, bool $a_export=false)
Render banner, user name.
$ilUser
Definition: imgupload.php:34
ilLocatorGUI $locator
setRightContent(string $a_html)
Sets content of right column.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderFullscreenHeader()

ilObjBlogGUI::renderFullscreenHeader ( ilGlobalTemplateInterface  $a_tpl,
int  $a_user_id,
bool  $a_export = false 
)

Render banner, user name.

Definition at line 1265 of file class.ilObjBlogGUI.php.

References $ilUser, $name, ilObject2GUI\$node_id, $post, ilObject2GUI\$user, ilObjUser\_getPersonalPicturePath(), ilObjUser\_lookupName(), ilChangeEvent\_recordReadEvent(), ILIAS\Repository\object(), ilGlobalTemplateInterface\resetHeaderBlock(), ilGlobalTemplateInterface\setDescription(), ilGlobalTemplateInterface\setTitle(), ilGlobalTemplateInterface\setTitleIcon(), and ilWACSignedPath\signFile().

Referenced by renderFullScreen().

1269  : void {
1270  $ilUser = $this->user;
1271 
1272  if (!$a_export) {
1274  $this->object->getType(),
1276  $this->object->getId(),
1277  $ilUser->getId()
1278  );
1279  }
1280 
1281  // repository blogs are multi-author
1282  $name = "";
1283  if ($this->id_type !== self::REPOSITORY_NODE_ID) {
1284  $name = ilObjUser::_lookupName($a_user_id);
1285  $name = $name["lastname"] . ", " . $name["firstname"];
1286  }
1287 
1288  // show banner?
1289  $banner = false;
1290  $blga_set = new ilSetting("blga");
1291  $banner_width = "";
1292  $banner_height = "";
1293  if ($blga_set->get("banner")) {
1294  $banner = ilWACSignedPath::signFile($this->object->getImageFullPath());
1295  $banner_width = $blga_set->get("banner_width");
1296  $banner_height = $blga_set->get("banner_height");
1297  if ($a_export) {
1298  $banner = basename($banner);
1299  }
1300  }
1301 
1302  $ppic = "";
1303  if ($this->object->hasProfilePicture()) {
1304  // repository (multi-user)
1305  if ($this->id_type === self::REPOSITORY_NODE_ID) {
1306  // #15030
1307  if ($this->blpg > 0 && !$a_export) {
1308  $post = new ilBlogPosting($this->blpg);
1309  $author_id = $post->getAuthor();
1310  if ($author_id) {
1311  $ppic = ilObjUser::_getPersonalPicturePath($author_id, "xsmall", true, true);
1312 
1313  $name = ilObjUser::_lookupName($author_id);
1314  $name = $name["lastname"] . ", " . $name["firstname"];
1315  }
1316  }
1317  }
1318  // workspace (author == owner)
1319  else {
1320  $ppic = ilObjUser::_getPersonalPicturePath($a_user_id, "xsmall", true, true);
1321  if ($a_export) {
1322  $ppic = basename($ppic);
1323  }
1324  }
1325  }
1326 
1327  $a_tpl->resetHeaderBlock(false);
1328  $a_tpl->setBanner($banner);
1329  $a_tpl->setTitleIcon($ppic);
1330  $a_tpl->setTitle($this->object->getTitle());
1331  if ($this->id_type === self::REPOSITORY_NODE_ID) {
1332  $a_tpl->setDescription($this->object->getDescription());
1333  } else {
1334  $a_tpl->setDescription($name);
1335  }
1336  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
resetHeaderBlock(bool $a_reset_header_action=true)
Reset all header properties: title, icon, description, alerts, action menu.
static _lookupName(int $a_user_id)
lookup user name
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
if($format !==null) $name
Definition: metadata.php:247
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
static _getPersonalPicturePath(int $a_usr_id, string $a_size="small", bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
setDescription(string $a_descr)
Sets description below title in standard template.
$ilUser
Definition: imgupload.php:34
static signFile(string $path_to_file)
$post
Definition: ltitoken.php:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderList()

ilObjBlogGUI::renderList ( array  $items,
string  $a_cmd = "preview",
string  $a_link_template = "",
bool  $a_show_inactive = false,
string  $a_export_directory = "" 
)

Build posting month list.

Definition at line 1368 of file class.ilObjBlogGUI.php.

References Vendor\Package\$b, ilObject2GUI\$ctrl, $disable_notes, $ilUser, $keyword, ilObject2GUI\$lng, $month, $preview, ilObject2GUI\$user, ilLink\_getStaticLink(), ilPageObject\_lookupActive(), ilObject\_lookupOwner(), ilCalendarUtil\_numericMonthToString(), buildExportLink(), ilDatePresentation\formatDate(), ilObject2GUI\getAccessHandler(), ilBlogPosting\getKeywords(), ilUserUtil\getNamePresentation(), ilBlogPostingGUI\getSnippet(), getType(), IL_CAL_DATE, isAdmin(), ILIAS\Repository\lng(), mayEditPosting(), ILIAS\Repository\object(), ILIAS\Repository\toolbar(), ilLanguage\txt(), and ILIAS\Repository\ui().

Referenced by getHTML(), preview(), and render().

1374  : string {
1375  $lng = $this->lng;
1376  $ilCtrl = $this->ctrl;
1377  $ilUser = $this->user;
1378 
1379  $wtpl = new ilTemplate("tpl.blog_list.html", true, true, "Modules/Blog");
1380 
1381  // quick editing in portfolio
1382  if ($this->prt_id > 0 &&
1383  stripos($a_cmd, "embedded") !== false && ilObject::_lookupOwner($this->prt_id) === $ilUser->getId()) {
1384  // see ilPortfolioPageTableGUI::fillRow()
1385  $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", $this->user_page);
1386  $link = $ilCtrl->getLinkTargetByClass(array("ilportfoliopagegui", "ilobjbloggui"), "render");
1387  $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", "");
1388  $b = $this->ui->factory()->button()->standard(
1389  $this->lng->txt("blog_edit"),
1390  $link
1391  );
1392  $this->toolbar->addComponent($b);
1393  }
1394 
1395  $is_admin = $this->isAdmin();
1396 
1397  $last_month = null;
1398  $is_empty = true;
1399  foreach ($items as $item) {
1400  // only published items
1401  $is_active = ilBlogPosting::_lookupActive($item["id"], "blp");
1402  if (!$is_active && !$a_show_inactive) {
1403  continue;
1404  }
1405 
1406  $is_empty = false;
1407 
1408  $month = "";
1409  if (!$this->keyword && !$this->author) {
1410  $month = substr($item["created"]->get(IL_CAL_DATE), 0, 7);
1411  }
1412 
1413  if (!$last_month || $last_month != $month) {
1414  if ($last_month) {
1415  $wtpl->setCurrentBlock("month_bl");
1416  $wtpl->parseCurrentBlock();
1417  }
1418 
1419  // title according to current "filter"/navigation
1420  if ($this->keyword) {
1421  $title = $lng->txt("blog_keyword") . ": " . $this->keyword;
1422  } elseif ($this->author) {
1423  $title = $lng->txt("blog_author") . ": " . ilUserUtil::getNamePresentation($this->author);
1424  } else {
1425  $title = ilCalendarUtil::_numericMonthToString((int) substr($month, 5)) .
1426  " " . substr($month, 0, 4);
1427 
1428  $last_month = $month;
1429  }
1430 
1431  $wtpl->setVariable("TXT_CURRENT_MONTH", $title);
1432  }
1433 
1434  if (!$a_link_template) {
1435  $ilCtrl->setParameterByClass("ilblogpostinggui", "bmn", $this->month);
1436  $ilCtrl->setParameterByClass("ilblogpostinggui", "blpg", $item["id"]);
1437  $preview = $ilCtrl->getLinkTargetByClass("ilblogpostinggui", $a_cmd);
1438  } else {
1439  $preview = $this->buildExportLink($a_link_template, "posting", $item["id"]);
1440  }
1441  $more_link = $preview;
1442 
1443  // actions
1444  $posting_edit = $this->mayEditPosting($item["id"], $item["author"]);
1445  if (($posting_edit || $is_admin) && !$a_link_template && $a_cmd === "preview") {
1446  $alist = new ilAdvancedSelectionListGUI();
1447  $alist->setId($item["id"]);
1448  $alist->setListTitle($lng->txt("actions"));
1449 
1450  if ($is_active && $this->object->hasApproval() && !$item["approved"]) {
1451  if ($is_admin) {
1452  $ilCtrl->setParameter($this, "apid", $item["id"]);
1453  $alist->addItem(
1454  $lng->txt("blog_approve"),
1455  "approve",
1456  $ilCtrl->getLinkTarget($this, "approve")
1457  );
1458  $ilCtrl->setParameter($this, "apid", "");
1459  }
1460 
1461  $wtpl->setVariable("APPROVAL", $lng->txt("blog_needs_approval"));
1462  }
1463 
1464  if ($posting_edit) {
1465  $alist->addItem(
1466  $lng->txt("edit_content"),
1467  "edit",
1468  $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "edit")
1469  );
1470  $more_link = $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "edit");
1471 
1472  // #11858
1473  if ($is_active) {
1474  $alist->addItem(
1475  $lng->txt("blog_toggle_draft"),
1476  "deactivate",
1477  $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deactivatePageToList")
1478  );
1479  } else {
1480  $alist->addItem(
1481  $lng->txt("blog_toggle_final"),
1482  "activate",
1483  $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "activatePageToList")
1484  );
1485  }
1486 
1487  $alist->addItem(
1488  $lng->txt("rename"),
1489  "rename",
1490  $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "edittitle")
1491  );
1492 
1493  if ($this->object->hasKeywords()) { // #13616
1494  $alist->addItem(
1495  $lng->txt("blog_edit_keywords"),
1496  "keywords",
1497  $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "editKeywords")
1498  );
1499  }
1500 
1501  $alist->addItem(
1502  $lng->txt("blog_edit_date"),
1503  "editdate",
1504  $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "editdate")
1505  );
1506  $alist->addItem(
1507  $lng->txt("delete"),
1508  "delete",
1509  $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deleteBlogPostingConfirmationScreen")
1510  );
1511  } elseif ($is_admin) {
1512  // #10513
1513  if ($is_active) {
1514  $ilCtrl->setParameter($this, "apid", $item["id"]);
1515  $alist->addItem(
1516  $lng->txt("blog_toggle_draft_admin"),
1517  "deactivate",
1518  $ilCtrl->getLinkTarget($this, "deactivateAdmin")
1519  );
1520  $ilCtrl->setParameter($this, "apid", "");
1521  }
1522 
1523  $alist->addItem(
1524  $lng->txt("delete"),
1525  "delete",
1526  $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deleteBlogPostingConfirmationScreen")
1527  );
1528  }
1529 
1530  $wtpl->setCurrentBlock("actions");
1531  $wtpl->setVariable("ACTION_SELECTOR", $alist->getHTML());
1532  $wtpl->parseCurrentBlock();
1533  }
1534 
1535  // comments
1536  if ($this->object->getNotesStatus() && !$a_link_template && !$this->disable_notes) {
1537  // count (public) notes
1538  $notes_context = $this->notes
1539  ->data()
1540  ->context(
1541  $this->obj_id,
1542  (int) $item["id"],
1543  "blp"
1544  );
1545  $count = $this->notes
1546  ->domain()
1547  ->getNrOfCommentsForContext($notes_context);
1548 
1549  if ($a_cmd !== "preview") {
1550  $wtpl->setCurrentBlock("comments");
1551  $wtpl->setVariable("TEXT_COMMENTS", $lng->txt("blog_comments"));
1552  $wtpl->setVariable("URL_COMMENTS", $preview);
1553  $wtpl->setVariable("COUNT_COMMENTS", $count);
1554  $wtpl->parseCurrentBlock();
1555  }
1556  }
1557 
1558  // permanent link
1559  if ($a_cmd !== "preview" && $a_cmd !== "previewEmbedded") {
1560  if ($this->id_type === self::WORKSPACE_NODE_ID) {
1561  $goto = $this->getAccessHandler()->getGotoLink($this->node_id, $this->obj_id, "_" . $item["id"]);
1562  } else {
1563  $goto = ilLink::_getStaticLink($this->node_id, $this->getType(), true, "_" . $item["id"]);
1564  }
1565  $wtpl->setCurrentBlock("permalink");
1566  $wtpl->setVariable("URL_PERMALINK", $goto);
1567  $wtpl->setVariable("TEXT_PERMALINK", $lng->txt("blog_link"));
1568  $wtpl->parseCurrentBlock();
1569  }
1570 
1571  $snippet = ilBlogPostingGUI::getSnippet(
1572  $item["id"],
1573  $this->object->hasAbstractShorten(),
1574  $this->object->getAbstractShortenLength(),
1575  "&hellip;",
1576  $this->object->hasAbstractImage(),
1577  $this->object->getAbstractImageWidth(),
1578  $this->object->getAbstractImageHeight(),
1579  $a_export_directory
1580  );
1581 
1582  if ($snippet) {
1583  $wtpl->setCurrentBlock("more");
1584  $wtpl->setVariable("URL_MORE", $more_link);
1585  $wtpl->setVariable("TEXT_MORE", $lng->txt("blog_list_more"));
1586  $wtpl->parseCurrentBlock();
1587  }
1588 
1589 
1590 
1591  if (!$is_active) {
1592  $wtpl->setCurrentBlock("draft_text");
1593  $wtpl->setVariable("DRAFT_TEXT", $lng->txt("blog_draft_text"));
1594  $wtpl->parseCurrentBlock();
1595  $wtpl->setVariable("DRAFT_CLASS", " ilBlogListItemDraft");
1596  }
1597 
1598  // reading time
1599  $reading_time = $this->reading_time_manager->getReadingTime(
1600  $this->object->getId(),
1601  $item["id"]
1602  );
1603  if (!is_null($reading_time)) {
1604  $this->lng->loadLanguageModule("copg");
1605  $wtpl->setCurrentBlock("reading_time");
1606  $wtpl->setVariable(
1607  "READING_TIME",
1608  $this->lng->txt("copg_est_reading_time") . ": " .
1609  sprintf($this->lng->txt("copg_x_minutes"), $reading_time)
1610  );
1611  $wtpl->parseCurrentBlock();
1612  }
1613 
1614  $wtpl->setCurrentBlock("posting");
1615 
1616  $author = "";
1617  if ($this->id_type === self::REPOSITORY_NODE_ID) {
1618  $authors = array();
1619 
1620  $author_id = $item["author"];
1621  if ($author_id) {
1622  $authors[] = ilUserUtil::getNamePresentation($author_id);
1623  }
1624 
1625  if (isset($item["editors"])) {
1626  foreach ($item["editors"] as $editor_id) {
1627  $authors[] = ilUserUtil::getNamePresentation($editor_id);
1628  }
1629  }
1630 
1631  if ($authors) {
1632  $author = implode(", ", $authors) . " - ";
1633  }
1634  }
1635 
1636  // title
1637  $wtpl->setVariable("URL_TITLE", $preview);
1638  $wtpl->setVariable("TITLE", $item["title"]);
1639 
1640  $kw = ilBlogPosting::getKeywords($this->obj_id, $item["id"]);
1641  natcasesort($kw);
1642  $keywords = (count($kw) > 0)
1643  ? "<br>" . $this->lng->txt("keywords") . ": " . implode(", ", $kw)
1644  : "";
1645 
1646  $wtpl->setVariable("DATETIME", $author .
1647  ilDatePresentation::formatDate($item["created"]) . $keywords);
1648 
1649  // content
1650  $wtpl->setVariable("CONTENT", $snippet);
1651 
1652  $wtpl->parseCurrentBlock();
1653  }
1654 
1655  // permalink
1656  if ($a_cmd === "previewFullscreen") {
1657  $this->tpl->setPermanentLink(
1658  "blog",
1659  $this->node_id,
1660  ($this->id_type === self::WORKSPACE_NODE_ID)
1661  ? "_wsp"
1662  : ""
1663  );
1664  }
1665 
1666  if (!$is_empty || $a_show_inactive) {
1667  return $wtpl->get();
1668  }
1669  return "";
1670  }
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
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 _numericMonthToString(int $a_month, bool $a_long=true)
numeric month to string
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
$preview
Definition: imgupload.php:81
mayEditPosting(int $a_posting_id, int $a_author_id=null)
Check if user may edit posting.
const IL_CAL_DATE
isAdmin()
Check if user has admin access (approve, may edit & deactivate all postings)
$ilUser
Definition: imgupload.php:34
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.
static getKeywords(int $a_obj_id, int $a_posting_id)
buildExportLink(string $a_template, string $a_type, string $a_id)
Build export link.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderNavigation()

ilObjBlogGUI::renderNavigation ( string  $a_list_cmd = "render",
string  $a_posting_cmd = "preview",
string  $a_link_template = null,
bool  $a_show_inactive = false,
int  $a_blpg = 0 
)

Build navigation blocks.

Definition at line 2247 of file class.ilObjBlogGUI.php.

References $DIC, $ilSetting, $items, ilObject2GUI\$node_id, ilObjectGUI\$settings, $url, CLIENT_ID, ilRSSButtonGUI\get(), ilRSSButtonGUI\ICON_RSS, ILIAS\Repository\lng(), mayEditPosting(), ILIAS\Repository\object(), renderNavigationByAuthors(), renderNavigationByDate(), and renderNavigationByKeywords().

Referenced by executeCommand(), getHTML(), preview(), and render().

2253  : string {
2255  $a_items = $this->items;
2256 
2257  $blpg = ($a_blpg > 0)
2258  ? $a_blpg
2259  : $this->blpg;
2260 
2261  if ($this->object->getOrder()) {
2262  $order = array_flip($this->object->getOrder());
2263  } else {
2264  $order = array(
2265  "navigation" => 0
2266  ,"keywords" => 2
2267  ,"authors" => 1
2268  );
2269  }
2270 
2271  $wtpl = new ilTemplate("tpl.blog_list_navigation.html", true, true, "Modules/Blog");
2272 
2273  $blocks = array();
2274 
2275  // by date
2276  if (count($a_items)) {
2277  $blocks[$order["navigation"]] = array(
2278  $this->lng->txt("blog_navigation"),
2279  $this->renderNavigationByDate($a_items, $a_list_cmd, $a_posting_cmd, $a_link_template, $a_show_inactive, $a_blpg)
2280  );
2281  }
2282 
2283  if ($this->object->hasKeywords()) {
2284  // keywords
2285  $may_edit_keywords = ($blpg > 0 &&
2286  $this->mayEditPosting($blpg) &&
2287  $a_list_cmd !== "preview" &&
2288  $a_list_cmd !== "gethtml" &&
2289  !$a_link_template);
2290  $keywords = $this->renderNavigationByKeywords($a_list_cmd, $a_show_inactive, (bool) $a_link_template, $a_blpg);
2291  if ($keywords || $may_edit_keywords) {
2292  if (!$keywords) {
2293  $keywords = $this->lng->txt("blog_no_keywords");
2294  }
2295  $cmd = null;
2296  $blocks[$order["keywords"]] = array(
2297  $this->lng->txt("blog_keywords"),
2298  $keywords,
2299  $cmd
2300  ? array($cmd, $this->lng->txt("blog_edit_keywords"))
2301  : null
2302  );
2303  }
2304  }
2305 
2306  // is not part of (html) export
2307  if (!$a_link_template) {
2308  // authors
2309  if ($this->id_type === self::REPOSITORY_NODE_ID &&
2310  $this->object->hasAuthors()) {
2311  $authors = $this->renderNavigationByAuthors($a_items, $a_list_cmd, $a_show_inactive);
2312  if ($authors) {
2313  $blocks[$order["authors"]] = array($this->lng->txt("blog_authors"), $authors);
2314  }
2315  }
2316 
2317  // rss
2318  if ($this->object->hasRSS() &&
2319  $ilSetting->get('enable_global_profiles') &&
2320  $a_list_cmd === "preview") {
2321  // #10827
2322  $blog_id = $this->node_id;
2323  if ($this->id_type !== self::WORKSPACE_NODE_ID) {
2324  $blog_id .= "_cll";
2325  }
2326  $url = ILIAS_HTTP_PATH . "/feed.php?blog_id=" . $blog_id .
2327  "&client_id=" . rawurlencode(CLIENT_ID);
2328 
2329  $wtpl->setVariable("RSS_BUTTON", ilRSSButtonGUI::get(ilRSSButtonGUI::ICON_RSS, $url));
2330  }
2331  }
2332 
2333  if (count($blocks)) {
2334  global $DIC;
2335 
2336  $ui_factory = $DIC->ui()->factory();
2337  $ui_renderer = $DIC->ui()->renderer();
2338 
2339  ksort($blocks);
2340  foreach ($blocks as $block) {
2341  $title = $block[0];
2342 
2343  $content = $block[1];
2344 
2345  $secondary_panel = $ui_factory->panel()->secondary()->legacy($title, $ui_factory->legacy($content));
2346 
2347  if (isset($block[2]) && is_array($block[2])) {
2348  $link = $ui_factory->button()->shy($block[2][1], $block[2][0]);
2349  $secondary_panel = $secondary_panel->withFooter($link);
2350  }
2351 
2352  $wtpl->setCurrentBlock("block_bl");
2353  $wtpl->setVariable("BLOCK", $ui_renderer->render($secondary_panel));
2354  $wtpl->parseCurrentBlock();
2355  }
2356  }
2357 
2358  return $wtpl->get();
2359  }
renderNavigationByKeywords(string $a_list_cmd="render", bool $a_show_inactive=false, string $a_link_template="", int $a_blpg=0)
Build navigation by keywords block.
renderNavigationByDate(array $a_items, string $a_list_cmd="render", string $a_posting_cmd="preview", ?string $a_link_template=null, bool $a_show_inactive=false, int $a_blpg=0)
Build navigation by date block.
renderNavigationByAuthors(array $a_items, string $a_list_cmd="render", bool $a_show_inactive=false)
global $DIC
Definition: feed.php:28
const CLIENT_ID
Definition: constants.php:41
mayEditPosting(int $a_posting_id, int $a_author_id=null)
Check if user may edit posting.
static get(string $a_type, string $a_href="")
Get icon html.
global $ilSetting
Definition: privfeed.php:17
$url
ilSetting $settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderNavigationByAuthors()

ilObjBlogGUI::renderNavigationByAuthors ( array  $a_items,
string  $a_list_cmd = "render",
bool  $a_show_inactive = false 
)
protected

Definition at line 1942 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, ilObjectGUI\$id, $name, $url, ilPageObject\_lookupActive(), ilObjUser\_lookupName(), ilObject\_lookupType(), and ilUserUtil\getNamePresentation().

Referenced by renderNavigation().

1946  : string {
1947  $ilCtrl = $this->ctrl;
1948 
1949  $authors = array();
1950  foreach ($a_items as $month => $items) {
1951  foreach ($items as $item) {
1952  if (($a_show_inactive || ilBlogPosting::_lookupActive($item["id"], "blp"))) {
1953  if ($item["author"]) {
1954  $authors[] = $item["author"];
1955  }
1956 
1957  if (isset($item["editors"])) {
1958  foreach ($item["editors"] as $editor_id) {
1959  if ($editor_id != $item["author"]) {
1960  $authors[] = $editor_id;
1961  }
1962  }
1963  }
1964  }
1965  }
1966  }
1967 
1968  $authors = array_unique($authors);
1969 
1970  // filter out deleted users
1971  $authors = array_filter($authors, function ($id) {
1972  return ilObject::_lookupType($id) == "usr";
1973  });
1974 
1975  if (count($authors) > 1) {
1976  $list = array();
1977  foreach ($authors as $user_id) {
1978  if ($user_id) {
1979  $ilCtrl->setParameter($this, "ath", $user_id);
1980  $url = $ilCtrl->getLinkTarget($this, $a_list_cmd);
1981  $ilCtrl->setParameter($this, "ath", "");
1982 
1983  $base_name = ilUserUtil::getNamePresentation($user_id);
1984  if (substr($base_name, 0, 1) == "[") {
1985  $name = ilUserUtil::getNamePresentation($user_id, true);
1986  $sort = $name;
1987  } else {
1989  $user_id,
1990  true,
1991  false,
1992  "",
1993  false,
1994  true,
1995  false
1996  );
1997  $name_arr = ilObjUser::_lookupName($user_id);
1998  $sort = $name_arr["lastname"] . " " . $name_arr["firstname"];
1999  }
2000 
2001  $idx = trim(strip_tags($sort)) . "///" . $user_id; // #10934
2002  $list[$idx] = array($name, $url);
2003  }
2004  }
2005  ksort($list);
2006 
2007  $wtpl = new ilTemplate("tpl.blog_list_navigation_authors.html", true, true, "Modules/Blog");
2008 
2009  $wtpl->setCurrentBlock("author");
2010  foreach ($list as $author) {
2011  $wtpl->setVariable("TXT_AUTHOR", $author[0]);
2012  $wtpl->setVariable("URL_AUTHOR", $author[1]);
2013  $wtpl->parseCurrentBlock();
2014  }
2015 
2016  return $wtpl->get();
2017  }
2018  return "";
2019  }
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static _lookupName(int $a_user_id)
lookup user name
if($format !==null) $name
Definition: metadata.php:247
$url
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderNavigationByDate()

ilObjBlogGUI::renderNavigationByDate ( array  $a_items,
string  $a_list_cmd = "render",
string  $a_posting_cmd = "preview",
?string  $a_link_template = null,
bool  $a_show_inactive = false,
int  $a_blpg = 0 
)
protected

Build navigation by date block.

Definition at line 1687 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, ilObjectGUI\$id, $month, $url, ilPageObject\_lookupActive(), ilCalendarUtil\_numericMonthToString(), buildExportLink(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilObjBlog\NAV_MODE_LIST, ILIAS\Repository\object(), and ILIAS\Repository\ui().

Referenced by renderNavigation().

1694  : string {
1695  $ilCtrl = $this->ctrl;
1696 
1697  $blpg = ($a_blpg > 0)
1698  ? $a_blpg
1699  : $this->blpg;
1700 
1701 
1702  // gather page active status
1703  foreach ($a_items as $month => $postings) {
1704  foreach (array_keys($postings) as $id) {
1705  $active = ilBlogPosting::_lookupActive($id, "blp");
1706  if (!$a_show_inactive && !$active) {
1707  unset($a_items[$month][$id]);
1708  } else {
1709  $a_items[$month][$id]["active"] = $active;
1710  }
1711  }
1712  if (!count($a_items[$month])) {
1713  unset($a_items[$month]);
1714  }
1715  }
1716 
1717  // list month (incl. postings)
1718  if ($this->object->getNavMode() === ilObjBlog::NAV_MODE_LIST || $a_link_template) {
1719  //$max_detail_postings = $this->object->getNavModeListPostings();
1720  $max_months = $this->object->getNavModeListMonths();
1721 
1722  $wtpl = new ilTemplate("tpl.blog_list_navigation_by_date.html", true, true, "Modules/Blog");
1723 
1724  $ilCtrl->setParameter($this, "blpg", "");
1725 
1726  $counter = $mon_counter = $last_year = 0;
1727  foreach ($a_items as $month => $postings) {
1728  if (!$a_link_template && $max_months && $mon_counter >= $max_months) {
1729  break;
1730  }
1731 
1732  $add_year = false;
1733  $year = substr($month, 0, 4);
1734  if (!$last_year || $year != $last_year) {
1735  // #13562
1736  $add_year = true;
1737  $last_year = $year;
1738  }
1739 
1740  $mon_counter++;
1741 
1742  $month_name = ilCalendarUtil::_numericMonthToString((int) substr($month, 5));
1743 
1744  if (!$a_link_template) {
1745  $ilCtrl->setParameter($this, "bmn", $month);
1746  $month_url = $ilCtrl->getLinkTarget($this, $a_list_cmd);
1747  } else {
1748  $month_url = $this->buildExportLink($a_link_template, "list", $month);
1749  }
1750 
1751  // list postings for month
1752  //if($counter < $max_detail_postings)
1753  if ($mon_counter <= $this->object->getNavModeListMonthsWithPostings()) {
1754  if ($add_year) {
1755  $wtpl->setCurrentBlock("navigation_year_details");
1756  $wtpl->setVariable("YEAR", $year);
1757  $wtpl->parseCurrentBlock();
1758  }
1759 
1760  foreach ($postings as $id => $posting) {
1761  //if($max_detail_postings && $counter >= $max_detail_postings)
1762  //{
1763  // break;
1764  //}
1765 
1766  $counter++;
1767 
1768  $caption = /* ilDatePresentation::formatDate($posting["created"], IL_CAL_DATETIME).
1769  ", ".*/ $posting["title"];
1770 
1771  if (!$a_link_template) {
1772  $ilCtrl->setParameterByClass("ilblogpostinggui", "bmn", $month);
1773  $ilCtrl->setParameterByClass("ilblogpostinggui", "blpg", $id);
1774  $url = $ilCtrl->getLinkTargetByClass("ilblogpostinggui", $a_posting_cmd);
1775  } else {
1776  $url = $this->buildExportLink($a_link_template, "posting", $id);
1777  }
1778 
1779  if (!$posting["active"]) {
1780  $wtpl->setVariable("NAV_ITEM_DRAFT", $this->lng->txt("blog_draft"));
1781  } elseif ($this->object->hasApproval() && !$posting["approved"]) {
1782  $wtpl->setVariable("NAV_ITEM_APPROVAL", $this->lng->txt("blog_needs_approval"));
1783  }
1784 
1785  $wtpl->setCurrentBlock("navigation_item");
1786  $wtpl->setVariable("NAV_ITEM_URL", $url);
1787  $wtpl->setVariable("NAV_ITEM_CAPTION", $caption);
1788  $wtpl->parseCurrentBlock();
1789  }
1790 
1791  $wtpl->setCurrentBlock("navigation_month_details");
1792  $wtpl->setVariable("NAV_MONTH", $month_name);
1793  $wtpl->setVariable("URL_MONTH", $month_url);
1794  }
1795  // summarized month
1796  else {
1797  if ($add_year) {
1798  $wtpl->setCurrentBlock("navigation_year");
1799  $wtpl->setVariable("YEAR", $year);
1800  $wtpl->parseCurrentBlock();
1801  }
1802 
1803  $wtpl->setCurrentBlock("navigation_month");
1804  $wtpl->setVariable("MONTH_NAME", $month_name);
1805  $wtpl->setVariable("URL_MONTH", $month_url);
1806  $wtpl->setVariable("MONTH_COUNT", count($postings));
1807  }
1808  $wtpl->parseCurrentBlock();
1809  }
1810 
1811  if (!$a_link_template) {
1812  $this->ctrl->setParameterByClass(self::class, "bmn", null);
1813  $url = $this->ctrl->getLinkTargetByClass(self::class, $a_list_cmd);
1814  } else {
1815  $url = "index.html";
1816  }
1817  $wtpl->setVariable(
1818  "STARTING_PAGE",
1819  $this->ui->renderer()->render(
1820  $this->ui->factory()->link()->standard(
1821  $this->lng->txt("blog_starting_page"),
1822  $url
1823  )
1824  )
1825  );
1826  }
1827  // single month
1828  else {
1829  $wtpl = new ilTemplate("tpl.blog_list_navigation_month.html", true, true, "Modules/Blog");
1830 
1831  $ilCtrl->setParameter($this, "blpg", "");
1832 
1833  $month_options = array();
1834  foreach ($a_items as $month => $postings) {
1835  $month_name = ilCalendarUtil::_numericMonthToString((int) substr($month, 5)) .
1836  " " . substr($month, 0, 4);
1837 
1838  $month_options[$month] = $month_name;
1839 
1840  if ($month == $this->month) {
1841  if (!$a_link_template) {
1842  $ilCtrl->setParameter($this, "bmn", $month);
1843  $month_url = $ilCtrl->getLinkTarget($this, $a_list_cmd);
1844  } else {
1845  $month_url = $this->buildExportLink($a_link_template, "list", $month);
1846  }
1847 
1848  foreach ($postings as $id => $posting) {
1849  $caption = /* ilDatePresentation::formatDate($posting["created"], IL_CAL_DATETIME).
1850  ", ".*/ $posting["title"];
1851 
1852  if (!$a_link_template) {
1853  $ilCtrl->setParameterByClass("ilblogpostinggui", "bmn", $month);
1854  $ilCtrl->setParameterByClass("ilblogpostinggui", "blpg", $id);
1855  $url = $ilCtrl->getLinkTargetByClass("ilblogpostinggui", $a_posting_cmd);
1856  } else {
1857  $url = $this->buildExportLink($a_link_template, "posting", $id);
1858  }
1859 
1860  if (!$posting["active"]) {
1861  $wtpl->setVariable("NAV_ITEM_DRAFT", $this->lng->txt("blog_draft"));
1862  } elseif ($this->object->hasApproval() && !$posting["approved"]) {
1863  $wtpl->setVariable("NAV_ITEM_APPROVAL", $this->lng->txt("blog_needs_approval"));
1864  }
1865 
1866  $wtpl->setCurrentBlock("navigation_item");
1867  $wtpl->setVariable("NAV_ITEM_URL", $url);
1868  $wtpl->setVariable("NAV_ITEM_CAPTION", $caption);
1869  $wtpl->parseCurrentBlock();
1870  }
1871 
1872  $wtpl->setCurrentBlock("navigation_month_details");
1873  if ($blpg > 0) {
1874  $wtpl->setVariable("NAV_MONTH", $month_name);
1875  $wtpl->setVariable("URL_MONTH", $month_url);
1876  }
1877  $wtpl->parseCurrentBlock();
1878  }
1879  }
1880 
1881  if ($blpg === 0) {
1882  $wtpl->setCurrentBlock("option_bl");
1883  foreach ($month_options as $value => $caption) {
1884  $wtpl->setVariable("OPTION_VALUE", $value);
1885  $wtpl->setVariable("OPTION_CAPTION", $caption);
1886  if ($value == $this->month) {
1887  $wtpl->setVariable("OPTION_SEL", ' selected="selected"');
1888  }
1889  $wtpl->parseCurrentBlock();
1890  }
1891 
1892  $wtpl->setVariable("FORM_ACTION", $ilCtrl->getFormAction($this, $a_list_cmd));
1893  }
1894  }
1895  $ilCtrl->setParameter($this, "bmn", $this->month);
1896  $ilCtrl->setParameterByClass("ilblogpostinggui", "bmn", "");
1897  return $wtpl->get();
1898  }
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
static _numericMonthToString(int $a_month, bool $a_long=true)
numeric month to string
const NAV_MODE_LIST
$url
buildExportLink(string $a_template, string $a_type, string $a_id)
Build export link.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderNavigationByKeywords()

ilObjBlogGUI::renderNavigationByKeywords ( string  $a_list_cmd = "render",
bool  $a_show_inactive = false,
string  $a_link_template = "",
int  $a_blpg = 0 
)
protected

Build navigation by keywords block.

Definition at line 1903 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, $url, buildExportLink(), getKeywords(), and ilTagging\getRelevanceClass().

Referenced by renderNavigation().

1908  : string {
1909  $ilCtrl = $this->ctrl;
1910 
1911  $blpg = ($a_blpg > 0)
1912  ? $a_blpg
1913  : $this->blpg;
1914 
1915  $keywords = $this->getKeywords($a_show_inactive, $blpg);
1916  if ($keywords) {
1917  $wtpl = new ilTemplate("tpl.blog_list_navigation_keywords.html", true, true, "Modules/Blog");
1918 
1919  $max = max($keywords);
1920 
1921  $wtpl->setCurrentBlock("keyword");
1922  foreach ($keywords as $keyword => $counter) {
1923  if (!$a_link_template) {
1924  $ilCtrl->setParameter($this, "kwd", urlencode((string) $keyword)); // #15885
1925  $url = $ilCtrl->getLinkTarget($this, $a_list_cmd);
1926  $ilCtrl->setParameter($this, "kwd", "");
1927  } else {
1928  $url = $this->buildExportLink($a_link_template, "keyword", $keyword);
1929  }
1930 
1931  $wtpl->setVariable("TXT_KEYWORD", $keyword);
1932  $wtpl->setVariable("CLASS_KEYWORD", ilTagging::getRelevanceClass($counter, $max));
1933  $wtpl->setVariable("URL_KEYWORD", $url);
1934  $wtpl->parseCurrentBlock();
1935  }
1936 
1937  return $wtpl->get();
1938  }
1939  return "";
1940  }
static getRelevanceClass(int $cnt, int $max)
getKeywords(bool $a_show_inactive, ?int $a_posting_id=null)
Get keywords for single posting or complete blog.
$url
buildExportLink(string $a_template, string $a_type, string $a_id)
Build export link.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderToolbarNavigation()

ilObjBlogGUI::renderToolbarNavigation ( array  $a_items,
bool  $single_posting = false 
)

Toolbar navigation.

Definition at line 2024 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, $DIC, Vendor\Package\$f, ilObject2GUI\$lng, $prtf_embed, ilObject2GUI\$toolbar, ilToolbarGUI\addComponent(), ilToolbarGUI\addSeparator(), getLatestMonth(), getLatestPosting(), ilCtrl\getLinkTarget(), ilCtrl\getLinkTargetByClass(), getNextMonth(), getNextPosting(), getPreviousMonth(), getPreviousPosting(), mayContribute(), mayEditPosting(), ilCtrl\setParameter(), ilCtrl\setParameterByClass(), and ilLanguage\txt().

Referenced by executeCommand(), and preview().

2027  : void {
2028  global $DIC;
2029 
2030  $toolbar = $DIC->toolbar();
2031  $lng = $DIC->language();
2032  $ctrl = $DIC->ctrl();
2033 
2034  $f = $DIC->ui()->factory();
2035 
2036  $cmd = ($this->prtf_embed)
2037  ? "previewEmbedded"
2038  : "previewFullscreen";
2039 
2040  if ($single_posting) { // single posting view
2041  $latest_posting = $this->getLatestPosting($a_items);
2042  if ($latest_posting > 0 && $this->blpg !== $latest_posting) {
2043  $ctrl->setParameterByClass("ilblogpostinggui", "blpg", $latest_posting);
2044  $mb = $f->button()->standard(
2045  $lng->txt("blog_latest_posting"),
2046  $ctrl->getLinkTargetByClass("ilblogpostinggui", $cmd)
2047  );
2048  } else {
2049  $mb = $f->button()->standard($lng->txt("blog_latest_posting"), "#")->withUnavailableAction();
2050  }
2051 
2052  $prev_posting = $this->getPreviousPosting($a_items);
2053  if ($prev_posting > 0) {
2054  $ctrl->setParameterByClass("ilblogpostinggui", "blpg", $prev_posting);
2055  $pb = $f->button()->standard(
2056  $lng->txt("previous"),
2057  $ctrl->getLinkTargetByClass("ilblogpostinggui", $cmd)
2058  );
2059  } else {
2060  $pb = $f->button()->standard($lng->txt("previous"), "#")->withUnavailableAction();
2061  }
2062 
2063  $next_posting = $this->getNextPosting($a_items);
2064  if ($next_posting > 0) {
2065  $ctrl->setParameterByClass("ilblogpostinggui", "blpg", $next_posting);
2066  $nb = $f->button()->standard(
2067  $lng->txt("next"),
2068  $ctrl->getLinkTargetByClass("ilblogpostinggui", $cmd)
2069  );
2070  } else {
2071  $nb = $f->button()->standard($lng->txt("next"), "#")->withUnavailableAction();
2072  }
2073  $ctrl->setParameter($this, "blpg", $this->blpg);
2074  $vc = $f->viewControl()->section($pb, $mb, $nb);
2075  $toolbar->addComponent($vc);
2076  if ($this->mayContribute() && $this->mayEditPosting($this->blpg)) {
2077  $ctrl->setParameter($this, "prvm", "");
2078 
2079 
2080  $ctrl->setParameter($this, "bmn", "");
2081  $ctrl->setParameter($this, "blpg", "");
2082  $link = $ctrl->getLinkTarget($this, "");
2083  $ctrl->setParameter($this, "blpg", $this->blpg);
2084  $ctrl->setParameter($this, "bmn", $this->month);
2086  $toolbar->addComponent($f->button()->standard($lng->txt("blog_edit"), $link));
2087 
2088 
2089  $ctrl->setParameterByClass("ilblogpostinggui", "blpg", $this->blpg);
2090  /*if ($this->prtf_embed) {
2091  $this->ctrl->setParameterByClass("ilobjportfoliogui", "ppage", $this->user_page);
2092  }*/
2093  $link = $ctrl->getLinkTargetByClass("ilblogpostinggui", "edit");
2094  $toolbar->addComponent($f->button()->standard($lng->txt("blog_edit_posting"), $link));
2095  }
2096  } else { // month view
2097  $latest_month = $this->getLatestMonth($a_items);
2098  if ($latest_month !== "" && $this->month !== $latest_month) {
2099  $ctrl->setParameter($this, "bmn", $latest_month);
2100  $mb = $f->button()->standard(
2101  $lng->txt("blog_latest_posting"),
2102  $ctrl->getLinkTarget($this, "preview")
2103  );
2104  } else {
2105  $mb = $f->button()->standard($lng->txt("blog_latest_posting"), "#")->withUnavailableAction();
2106  }
2107 
2108  $prev_month = $this->getPreviousMonth($a_items);
2109  if ($prev_month !== "") {
2110  $ctrl->setParameter($this, "bmn", $prev_month);
2111  $pb = $f->button()->standard($lng->txt("previous"), $ctrl->getLinkTarget($this, "preview"));
2112  } else {
2113  $pb = $f->button()->standard($lng->txt("previous"), "#")->withUnavailableAction();
2114  }
2115 
2116  $next_month = $this->getNextMonth($a_items);
2117  if ($next_month !== "") {
2118  $ctrl->setParameter($this, "bmn", $next_month);
2119  $nb = $f->button()->standard($lng->txt("next"), $ctrl->getLinkTarget($this, "preview"));
2120  } else {
2121  $nb = $f->button()->standard($lng->txt("next"), "#")->withUnavailableAction();
2122  }
2123  $ctrl->setParameter($this, "bmn", $this->month);
2124  $vc = $f->viewControl()->section($pb, $mb, $nb);
2125  $toolbar->addComponent($vc);
2126 
2127  if ($this->mayContribute()) {
2128  $ctrl->setParameter($this, "prvm", "");
2129 
2130  $ctrl->setParameter($this, "bmn", "");
2131  $ctrl->setParameter($this, "blpg", "");
2132  $link = $ctrl->getLinkTarget($this, "");
2133  $ctrl->setParameter($this, "blpg", $this->blpg);
2134  $ctrl->setParameter($this, "bmn", $this->month);
2136  $toolbar->addComponent($f->button()->standard($lng->txt("blog_edit"), $link));
2137  }
2138  }
2139  }
getNextPosting(array $a_items)
Get next posting.
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
mayContribute()
Check if user may contribute at all.
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...
addComponent(\ILIAS\UI\Component\Component $a_comp)
getPreviousMonth(array $a_items)
getLatestMonth(array $a_items)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
getPreviousPosting(array $a_items)
Get previous posting.
global $DIC
Definition: feed.php:28
ilToolbarGUI $toolbar
getNextMonth(array $a_items)
Get next month.
mayEditPosting(int $a_posting_id, int $a_author_id=null)
Check if user may edit posting.
getLatestPosting(array $a_items)
Get previous posting.
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContentStyleSheet()

ilObjBlogGUI::setContentStyleSheet ( ilGlobalTemplateInterface  $a_tpl = null)

Definition at line 2906 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$tpl, ilGlobalTemplateInterface\addCss(), and ILIAS\Repository\object().

Referenced by executeCommand(), render(), and renderFullScreen().

2908  : void {
2909  $tpl = $this->tpl;
2910 
2911  if ($a_tpl) {
2912  $ctpl = $a_tpl;
2913  } else {
2914  $ctpl = $tpl;
2915  }
2916 
2917  $this->content_style_gui->addCss(
2918  $ctpl,
2919  $this->object->getRefId(),
2920  $this->object->getId()
2921  );
2922  }
ilGlobalTemplateInterface $tpl
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNotification()

ilObjBlogGUI::setNotification ( )
protected

Definition at line 2553 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$ctrl, $ilUser, ilObjectGUI\$obj_id, ilObject2GUI\$user, ilNotification\setNotification(), and ilNotification\TYPE_BLOG.

2553  : void
2554  {
2555  $ilUser = $this->user;
2556  $ilCtrl = $this->ctrl;
2557 
2558  switch ($this->ntf) {
2559  case 1:
2561  break;
2562 
2563  case 2:
2565  break;
2566  }
2567 
2568  $ilCtrl->redirect($this, "preview");
2569  }
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ setSettingsSubTabs()

ilObjBlogGUI::setSettingsSubTabs ( string  $a_active)
protected

Definition at line 187 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$access, $DIC, ilObjectGUI\$tree, ilRBACAccessHandler\checkAccess(), ilTree\checkForParentType(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by executeCommand(), and initEditCustomForm().

187  : void
188  {
189  global $DIC;
190 
191  $tree = $DIC->repositoryTree();
192  $access = $DIC->access();
193 
194  // general properties
195  $this->tabs_gui->addSubTab(
196  "properties",
197  $this->lng->txt("blog_properties"),
198  $this->ctrl->getLinkTarget($this, 'edit')
199  );
200 
201  $this->tabs_gui->addSubTab(
202  "style",
203  $this->lng->txt("obj_sty"),
204  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", "")
205  );
206 
207  // notification settings for blogs in courses and groups
208  if ($this->id_type === self::REPOSITORY_NODE_ID) {
209  $grp_ref_id = $tree->checkForParentType($this->object->getRefId(), 'grp');
210  $crs_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs');
211 
212  if ($grp_ref_id > 0 || $crs_ref_id > 0) {
213  if ($access->checkAccess('write', '', $this->ref_id)) {
214  $this->tabs_gui->addSubTab(
215  'notifications',
216  $this->lng->txt("notifications"),
217  $this->ctrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
218  );
219  }
220  }
221  }
222 
223  $this->tabs_gui->activateSubTab($a_active);
224  }
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
global $DIC
Definition: feed.php:28
checkForParentType(int $a_ref_id, string $a_type, bool $a_exclude_source_check=false)
Check for parent type e.g check if a folder (ref_id 3) is in a parent course obj => checkForParentTyp...
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjBlogGUI::setTabs ( )
protected

Definition at line 481 of file class.ilObjBlogGUI.php.

References $help, ilObject2GUI\$lng, $prtf_embed, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), mayContribute(), and ilLanguage\txt().

Referenced by executeCommand().

481  : void
482  {
483  $lng = $this->lng;
484  $ilHelp = $this->help;
485 
486  if ($this->id_type === self::WORKSPACE_NODE_ID) {
487  $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
488  }
489 
490  $ilHelp->setScreenIdComponent("blog");
491 
492  if ($this->checkPermissionBool("read")) {
493  $this->ctrl->setParameterByClass(self::class, "bmn", null);
494  $this->tabs_gui->addTab(
495  "content",
496  $lng->txt("content"),
497  $this->ctrl->getLinkTarget($this, "")
498  );
499  }
500  if ($this->checkPermissionBool("read") && !$this->prtf_embed) {
501  $this->tabs_gui->addTab(
502  "id_info",
503  $lng->txt("info_short"),
504  $this->ctrl->getLinkTargetByClass(array("ilobjbloggui", "ilinfoscreengui"), "showSummary")
505  );
506  }
507 
508  if ($this->checkPermissionBool("write")) {
509  $this->tabs_gui->addTab(
510  "settings",
511  $lng->txt("settings"),
512  $this->ctrl->getLinkTarget($this, "edit")
513  );
514 
515  if (!$this->prtf_embed) {
516  if ($this->id_type === self::REPOSITORY_NODE_ID) {
517  $this->tabs_gui->addTab(
518  "contributors",
519  $lng->txt("blog_contributors"),
520  $this->ctrl->getLinkTarget($this, "contributors")
521  );
522  }
523 
524  if ($this->id_type === self::REPOSITORY_NODE_ID) {
525  $this->tabs_gui->addTab(
526  "export",
527  $lng->txt("export"),
528  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
529  );
530  }
531  }
532  }
533 
534  if (!$this->prtf_embed) {
535  if ($this->mayContribute()) {
536  $this->tabs_gui->addNonTabbedLink(
537  "preview",
538  $lng->txt("blog_preview"),
539  $this->ctrl->getLinkTarget($this, "preview")
540  );
541  }
542  parent::setTabs();
543  }
544  }
mayContribute()
Check if user may contribute at all.
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...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ triggerAssignmentTool()

ilObjBlogGUI::triggerAssignmentTool ( )
protected

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

References $i, ilExerciseGSToolProvider\EXC_ASS_BUTTONS, ilExerciseGSToolProvider\EXC_ASS_IDS, and ilExerciseGSToolProvider\SHOW_EXC_ASSIGNMENT_INFO.

Referenced by executeCommand().

868  : void
869  {
870  $be = new ilBlogExercise($this->node_id);
871  $be_gui = new ilBlogExerciseGUI($this->node_id);
872  $assignments = $be->getAssignmentsOfBlog();
873  if (count($assignments) > 0) {
874  $ass_ids = array_map(static function ($i) {
875  return $i["ass_id"];
876  }, $assignments);
877  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
878  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
879  $this->tool_context->current()->addAdditionalData(
881  $be_gui->getActionButtons()
882  );
883  }
884  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilBlogExerciseGUI.
$i
Definition: metadata.php:41
+ Here is the caller graph for this function:

◆ updateCustom()

ilObjBlogGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

Definition at line 433 of file class.ilObjBlogGUI.php.

References ilObject2GUI\$lng, ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), ilObjectGUI\getObjectService(), and ilLanguage\txt().

433  : void
434  {
435  $lng = $this->lng;
436  $obj_service = $this->getObjectService();
437 
438  if ($this->id_type === self::REPOSITORY_NODE_ID) {
439  $this->object->setApproval($form->getInput("approval"));
440  $this->object->setAuthors($form->getInput("nav_authors"));
441  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
442  }
443  $this->object->setKeywords($form->getInput("keywords"));
444  $this->object->setNotesStatus($form->getInput("notes"));
445  $this->object->setProfilePicture($form->getInput("ppic"));
446  $this->object->setRSS($form->getInput("rss"));
447  $this->object->setAbstractShorten($form->getInput("abss"));
448  $this->object->setAbstractShortenLength($form->getInput("abssl"));
449  $this->object->setAbstractImage($form->getInput("absi"));
450  $this->object->setAbstractImageWidth($form->getInput("absiw"));
451  $this->object->setAbstractImageHeight($form->getInput("absih"));
452  $this->object->setNavMode($form->getInput("nav"));
453  $this->object->setNavModeListMonthsWithPostings($form->getInput("nav_list_mon_with_post"));
454  $this->object->setNavModeListMonths($form->getInput("nav_list_mon"));
455  $this->object->setOverviewPostings($form->getInput("ov_list_post_num"));
456  $this->reading_time_gui->saveSettingFromForm($form);
457 
458  $order = (array) $form->getInput("order");
459 
460  foreach ($order as $idx => $value) {
461  if ($value == $lng->txt("blog_navigation")) {
462  $order[$idx] = "navigation";
463  } elseif ($value == $lng->txt("blog_keywords")) {
464  $order[$idx] = "keywords";
465  } else {
466  $order[$idx] = "authors";
467  }
468  }
469  $this->object->setOrder($order);
470  // banner field is optional
471  $banner = $form->getItemByPostVar("banner");
472  if ($banner) {
473  if ($_FILES["banner"]["tmp_name"]) {
474  $this->object->uploadImage($_FILES["banner"]);
475  } elseif ($banner->getDeletionFlag()) {
476  $this->object->deleteImage();
477  }
478  }
479  }
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...
getItemByPostVar(string $a_post_var)
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-...
+ Here is the call graph for this function:

Field Documentation

◆ $apid

int ilObjBlogGUI::$apid = 0
protected

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

◆ $author

int ilObjBlogGUI::$author = null
protected

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

◆ $blog_request

StandardGUIRequest ilObjBlogGUI::$blog_request
protected

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

Referenced by __construct().

◆ $blpg

int ilObjBlogGUI::$blpg = 0
protected

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

Referenced by getNotesSubId(), getPreviousPosting(), and initHeaderAction().

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjBlogGUI::$content_style_domain
protected

Definition at line 65 of file class.ilObjBlogGUI.php.

◆ $content_style_gui

ILIAS Style Content GUIService ilObjBlogGUI::$content_style_gui
protected

Definition at line 64 of file class.ilObjBlogGUI.php.

◆ $disable_notes

bool ilObjBlogGUI::$disable_notes = false
protected

Definition at line 60 of file class.ilObjBlogGUI.php.

Referenced by executeCommand(), initHeaderAction(), and renderList().

◆ $edt

string ilObjBlogGUI::$edt
protected

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

◆ $gtp

int ilObjBlogGUI::$gtp = 0
protected

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

Referenced by executeCommand().

◆ $help

ilHelpGUI ilObjBlogGUI::$help
protected

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

Referenced by setTabs().

◆ $http

ILIAS HTTP Services ilObjBlogGUI::$http
protected

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

◆ $items

array ilObjBlogGUI::$items = []
protected

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

Referenced by buildPostingList(), getItems(), and renderNavigation().

◆ $keyword

string ilObjBlogGUI::$keyword = ""
protected

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

Referenced by getKeywords(), and renderList().

◆ $month

string ilObjBlogGUI::$month = ""
protected

◆ $month_default

bool ilObjBlogGUI::$month_default = false
protected

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

◆ $nav_history

ilNavigationHistory ilObjBlogGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $new_type

string ilObjBlogGUI::$new_type = ""
protected

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

◆ $notes

ILIAS Notes Service ilObjBlogGUI::$notes
protected

Definition at line 33 of file class.ilObjBlogGUI.php.

◆ $ntf

int ilObjBlogGUI::$ntf = 0
protected

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

◆ $old_nr

int ilObjBlogGUI::$old_nr = 0
protected

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

◆ $ppage

int ilObjBlogGUI::$ppage = 0
protected

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

◆ $prt_id

int ilObjBlogGUI::$prt_id = 0
protected

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

◆ $prtf_embed

bool ilObjBlogGUI::$prtf_embed = false

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

Referenced by renderToolbarNavigation(), and setTabs().

◆ $prvm

string ilObjBlogGUI::$prvm
protected

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

◆ $rbacadmin

ilRbacAdmin ilObjBlogGUI::$rbacadmin
protected

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

Referenced by addContributor(), and removeContributor().

◆ $reading_time_gui

ILIAS Blog ReadingTime BlogSettingsGUI ilObjBlogGUI::$reading_time_gui
protected

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

◆ $reading_time_manager

ILIAS Blog ReadingTime ReadingTimeManager ilObjBlogGUI::$reading_time_manager
protected

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

◆ $rendered_content

string ilObjBlogGUI::$rendered_content = ""
protected

Definition at line 32 of file class.ilObjBlogGUI.php.

Referenced by getRenderedContent().

◆ $tabs

ilTabsGUI ilObjBlogGUI::$tabs
protected

◆ $tool_context

ContextServices ilObjBlogGUI::$tool_context
protected

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

◆ $ui

ILIAS DI UIServices ilObjBlogGUI::$ui
protected

Definition at line 63 of file class.ilObjBlogGUI.php.

◆ $user_page

int ilObjBlogGUI::$user_page = 0
protected

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


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