19declare(strict_types=1);
43 bool $a_reference =
true
48 $this->notes_service =
$DIC->notes();
49 $this->settings_manager =
$service->domain()->blogSettings();
52 $this->rbac_review =
$DIC->rbac()->review();
54 $this->content_style_domain =
$DIC
58 if ($this->
getId() > 0) {
59 $this->blog_settings = $this->settings_manager->getByObjId($this->
getId());
61 $this->posting_manager =
$service->domain()->posting();
73 $this->notes_service->domain()->commentsActive($this->id)
75 $this->blog_settings = $this->settings_manager->getByObjId($this->
getId());
78 protected function doCreate(
bool $clone_mode =
false): void
84 $ilDB->manipulate(
"INSERT INTO il_blog (id,ppic,rss_active,approval" .
85 ",abs_shorten,abs_shorten_len,abs_image,abs_img_width,abs_img_height" .
86 ",keywords,authors,nav_mode,nav_list_mon_with_post,ov_post,nav_list_mon) VALUES (" .
87 $ilDB->quote($this->id,
"integer") .
"," .
88 $ilDB->quote(
true,
"integer") .
"," .
89 $ilDB->quote(
true,
"integer") .
"," .
90 $ilDB->quote(
false,
"integer") .
"," .
91 $ilDB->quote(
false,
"integer") .
"," .
92 $ilDB->quote(0,
"integer") .
"," .
93 $ilDB->quote(
false,
"integer") .
"," .
94 $ilDB->quote(0,
"integer") .
"," .
95 $ilDB->quote(0,
"integer") .
"," .
96 $ilDB->quote(
true,
"integer") .
"," .
97 $ilDB->quote(
false,
"integer") .
"," .
98 $ilDB->quote(self::NAV_MODE_LIST,
"integer") .
"," .
99 $ilDB->quote(5,
"integer") .
"," .
100 $ilDB->quote(5,
"integer") .
"," .
101 $ilDB->quote(5,
"integer") .
105 $this->notes_service->domain()->activateComments($this->
id);
114 $this->posting_manager->deleteAllByBlog($this->
id);
119 $ilDB->manipulate(
"DELETE FROM il_blog" .
120 " WHERE id = " .
$ilDB->quote($this->id,
"integer"));
129 $this->notes_service->domain()->activateComments(
143 $this->settings_manager->clone($this->
getId(), $new_obj->
getId());
146 $this->content_style_domain->styleForObjId($this->
getId())->cloneTo($new_obj->
getId());
158 $this->notes = $a_status;
164 'il_blog_contributor_' . $this->
getRefId(),
165 "Contributor of blog obj_no." . $this->
getId(),
166 'il_blog_contributor',
171 'il_blog_editor_' . $this->
getRefId(),
172 "Editor of blog obj_no." . $this->
getId(),
180 foreach ($this->rbac_review->getLocalRoles($a_node_id) as $role_id) {
190 foreach ($this->rbac_review->getLocalRoles($a_node_id) as $role_id) {
201 foreach ($this->rbac_review->getLocalRoles($a_node_id) as $role_id) {
217 foreach ($this->rbac_review->getParentRoleIds($a_node_id) as $role_id => $role) {
218 if ($role_id != $contr_role_id &&
219 $role_id != $editor_role_id) {
220 $all_ops = $this->rbac_review->getActiveOperationsOfRole($a_node_id, $role_id);
221 if (in_array($contr_op_id, $all_ops) ||
222 in_array($redact_op_id, $all_ops)) {
static removeForObject(int $type, int $id)
Remove all notifications for given object.
getRolesWithContributeOrRedact(int $a_node_id)
getLocalEditorRole(int $a_node_id)
getAllLocalRoles(int $a_node_id)
SettingsManager $settings_manager
ILIAS Blog Posting PostingManager $posting_manager
setNotesStatus(bool $a_status)
doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
ILIAS Style Content DomainService $content_style_domain
__construct(int $a_id=0, bool $a_reference=true)
Constructor.
doCreate(bool $clone_mode=false)
initDefaultRoles()
init default roles settings Purpose of this function is to create a local role folder and local roles...
getLocalContributorRole(int $a_node_id)
const ABSTRACT_DEFAULT_SHORTEN_LENGTH
const ABSTRACT_DEFAULT_IMAGE_WIDTH
const NAV_MODE_LIST_DEFAULT_POSTINGS
ILIAS Notes Service $notes_service
const ABSTRACT_DEFAULT_IMAGE_HEIGHT
static createDefaultRole(string $a_title, string $a_description, string $a_tpl_name, int $a_ref_id)
static _getTranslation(string $a_role_title)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
cloneMetaData(ilObject $target_obj)
Copy meta data.
static _lookupTitle(int $obj_id)
static _getOperationIdByName(string $a_operation)
get operation id by name of operation
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
foreach($_POST as $key=> $value) $res