ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilDidacticTemplateFilterPatternFactory Class Reference

Factory for didactic template filter patterns. More...

+ Collaboration diagram for ilDidacticTemplateFilterPatternFactory:

Static Public Member Functions

static lookupPatternsByParentId ($a_parent_id, $a_parent_type)
 Get patterns by template id. More...
 

Detailed Description

Factory for didactic template filter patterns.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 11 of file class.ilDidacticTemplateFilterPatternFactory.php.

Member Function Documentation

◆ lookupPatternsByParentId()

static ilDidacticTemplateFilterPatternFactory::lookupPatternsByParentId (   $a_parent_id,
  $a_parent_type 
)
static

Get patterns by template id.

Parameters
int$a_tpl_id
arrayArray of ilDidacticTemplateFilterPattern

Definition at line 18 of file class.ilDidacticTemplateFilterPatternFactory.php.

19 {
20 global $ilDB;
21
22 $query = 'SELECT pattern_id,pattern_type FROM didactic_tpl_fp ' .
23 'WHERE parent_id = ' . $ilDB->quote($a_parent_id) . ' ' .
24 'AND parent_type = ' . $ilDB->quote($a_parent_type, 'text');
25 $res = $ilDB->query($query);
26
27 $patterns = array();
28 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
29 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateFilterPattern.php';
30 switch ($row->pattern_type) {
32 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateIncludeFilterPattern.php';
33 $patterns[] = new ilDidacticTemplateIncludeFilterPattern($row->pattern_id);
34 break;
35
37 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateExcludeFilterPattern.php';
38 $patterns[] = new ilDidacticTemplateExcludeFilterPattern($row->pattern_id);
39 break;
40 }
41 }
42 return $patterns;
43 }
Implementation of an include filter pattern for didactic template actions.
Implementation of an include filter pattern for didactic template actions.
$query
foreach($_POST as $key=> $value) $res
global $ilDB

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, ilDidacticTemplateFilterPattern\PATTERN_EXCLUDE, and ilDidacticTemplateFilterPattern\PATTERN_INCLUDE.

Referenced by ilDidacticTemplateAction\filterRoles(), ilDidacticTemplateBlockRoleAction\read(), and ilDidacticTemplateLocalPolicyAction\read().

+ Here is the caller graph for this function:

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