ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDidacticTemplateFilterPatternFactory Class Reference

Factory for didactic template filter patterns. More...

+ Collaboration diagram for ilDidacticTemplateFilterPatternFactory:

Static Public Member Functions

static lookupPatternsByParentId (int $a_parent_id, string $a_parent_type)
 

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 25 of file class.ilDidacticTemplateFilterPatternFactory.php.

Member Function Documentation

◆ lookupPatternsByParentId()

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

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

27 : array
28 {
29 global $DIC;
30
31 $ilDB = $DIC->database();
32
33 $query = 'SELECT pattern_id,pattern_type FROM didactic_tpl_fp ' .
34 'WHERE parent_id = ' . $ilDB->quote($a_parent_id, ilDBConstants::T_INTEGER) . ' ' .
35 'AND parent_type = ' . $ilDB->quote($a_parent_type, 'text');
36 $res = $ilDB->query($query);
37
38 $patterns = [];
39 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
40 switch ($row->pattern_type) {
42
43 $patterns[] = new ilDidacticTemplateIncludeFilterPattern((int) $row->pattern_id);
44 break;
45
47
48 $patterns[] = new ilDidacticTemplateExcludeFilterPattern((int) $row->pattern_id);
49 break;
50 }
51 }
52
53 return $patterns;
54 }
Implementation of an include filter pattern for didactic template actions.
Implementation of an include filter pattern for didactic template actions.
$res
Definition: ltiservices.php:69
global $DIC
Definition: shib_login.php:26

References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, ilDidacticTemplateFilterPattern\PATTERN_EXCLUDE, ilDidacticTemplateFilterPattern\PATTERN_INCLUDE, and ilDBConstants\T_INTEGER.

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: