4 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateAction.php';
48 $this->pattern = $patterns;
87 $query =
'INSERT INTO didactic_tpl_abr (action_id,filter_type) ' .
89 $ilDB->quote($this->
getActionId(),
'integer') .
', ' .
97 $pattern->setParentType(self::PATTERN_PARENT_TYPE);
107 public function delete()
113 $query =
'DELETE FROM didactic_tpl_abr ' .
114 'WHERE action_id = ' . $ilDB->quote($this->
getActionId(),
'integer');
115 $ilDB->manipulate(
$query);
135 foreach ($roles as $role_id => $role) {
148 global $rbacadmin, $rbacreview;
151 $assign = $rbacreview->isAssignable($a_role_id,
$source->getRefId()) ?
'y' :
'n';
154 $rbacadmin->revokeSubtreePermissions(
$source->getRefId(), $a_role_id);
157 $rbacadmin->deleteSubtreeTemplates(
$source->getRefId(), $a_role_id);
159 $rbacadmin->assignRoleToFolder(
176 foreach ($roles as $role_id => $role) {
190 global $rbacreview, $rbacadmin;
195 if ($rbacreview->getRoleFolderOfRole($a_role_id) ==
$source->getRefId()) {
200 $rbacadmin->deleteLocalRole($a_role_id,
$source->getRefId());
203 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
205 $role->changeExistingObjects(
221 return self::TYPE_BLOCK_ROLE;
234 case self::FILTER_SOURCE_OBJ_ID:
239 case self::FILTER_SOURCE_TITLE:
245 $pattern->toXml($writer);
276 if (!parent::read()) {
280 $query =
'SELECT * FROM didactic_tpl_abr ' .
281 'WHERE action_id = ' . $ilDB->quote($this->
getActionId());
288 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateFilterPatternFactory.php';
read()
read action data ilDB $ilDB
getFilterType()
Get filter type.
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
const PATTERN_PARENT_TYPE
Description of ilDidacticTemplateBlockRoleAction.
static lookupPatternsByParentId($a_parent_id, $a_parent_type)
Get patterns by template id.
addFilterPattern(ilDidacticTemplateFilterPattern $pattern)
Add filter.
setFilterPatterns(array $patterns)
Set filter patterns.
getFilterPattern()
Get filter pattern.
static _lookupTitle($a_id)
lookup object title
__construct($action_id=0)
Constructor.
xmlEndTag($tag)
Writes an endtag.
toXml(ilXmlWriter $writer)
Export to xml.
deleteLocalPolicy($a_role_id, $source)
Delete local policy.
filterRoles(ilObject $source)
Filter roles.
setFilterType($a_type)
Set filter type.
foreach($_POST as $key=> $value) $res
blockRole($a_role_id, $source)
Blo k role.
const FILTER_SOURCE_TITLE
const FILTER_PARENT_ROLES
Create styles array
The data for the language used.
initSourceObject()
Init the source object.
Abstract class for template actions.
const MODE_UNPROTECTED_DELETE_LOCAL_POLICIES
const FILTER_SOURCE_OBJ_ID
static getLogger($a_component_id)
Get component logger.
Represents a filter pattern for didactic template actions.
getActionId()
Get action id.
getType()
Get action type.