4include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateAction.php';
48 $this->pattern = $patterns;
87 $query =
'INSERT INTO didactic_tpl_abr (action_id,filter_type) ' .
97 $pattern->setParentType(self::PATTERN_PARENT_TYPE);
107 public function delete()
113 $query =
'DELETE FROM didactic_tpl_abr ' .
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(
235 $writer->
xmlStartTag(
'roleFilter', array(
'source' =>
'objId'));
240 $writer->
xmlStartTag(
'roleFilter', array(
'source' =>
'title'));
276 if (!parent::read()) {
280 $query =
'SELECT * FROM didactic_tpl_abr ' .
288 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateFilterPatternFactory.php';
An exception for terminatinating execution or to throw for unit testing.
Abstract class for template actions.
getActionId()
Get action id.
initSourceObject()
Init the source object.
filterRoles(ilObject $source)
Filter roles.
Description of ilDidacticTemplateBlockRoleAction.
__construct($action_id=0)
Constructor.
getFilterPattern()
Get filter pattern.
read()
read action data @global ilDB $ilDB
toXml(ilXmlWriter $writer)
Export to xml.
getType()
Get action type.
const FILTER_SOURCE_TITLE
setFilterType($a_type)
Set filter type.
deleteLocalPolicy($a_role_id, $source)
Delete local policy.
addFilterPattern(ilDidacticTemplateFilterPattern $pattern)
Add filter.
setFilterPatterns(array $patterns)
Set filter patterns.
const FILTER_PARENT_ROLES
getFilterType()
Get filter type.
const PATTERN_PARENT_TYPE
const FILTER_SOURCE_OBJ_ID
blockRole($a_role_id, $source)
Blo k role.
static lookupPatternsByParentId($a_parent_id, $a_parent_type)
Get patterns by template id.
Represents a filter pattern for didactic template actions.
static getLogger($a_component_id)
Get component logger.
const MODE_UNPROTECTED_DELETE_LOCAL_POLICIES
static _lookupTitle($a_id)
lookup object title
xmlEndTag($tag)
Writes an endtag.
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
foreach($_POST as $key=> $value) $res