◆ __construct()
      
        
          | ilAccessCustomRBACOperationAddedObjective::__construct  | 
          ( | 
          string  | 
          $id,  | 
        
        
           | 
           | 
          string  | 
          $title,  | 
        
        
           | 
           | 
          string  | 
          $class,  | 
        
        
           | 
           | 
          int  | 
          $pos,  | 
        
        
           | 
           | 
          array  | 
          $types = []  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ achieve()
      
        
          | ilAccessCustomRBACOperationAddedObjective::achieve  | 
          ( | 
          Environment  | 
          $environment | ) | 
           | 
        
      
 
Definition at line 68 of file class.ilAccessCustomRBACOperationAddedObjective.php.
References $class, $dic, $id, $pos, $title, ilRbacReview\_getCustomRBACOperationId(), ilObject\_getObjectTypeIdByTitle(), ILIAS\Setup\Environment\getResource(), initEnvironment(), and resetDIC().
   70         $db = $environment->
getResource(Environment::RESOURCE_DATABASE);
    74         if ($this->
class == 
"create") {
    79         if (is_null($ops_id)) {
    80             $ops_id = $db->nextId(
"rbac_operations");
    83                 'ops_id' => [
'integer', $ops_id],
    90             $db->insert(
"rbac_operations", $values);
    93         foreach ($this->types as $type) {
    96                 $type_id = $db->nextId(
'object_data');
    99                     'obj_id' => [
'integer', $type_id],
   100                     'type' => [
'text', 
'typ'],
   101                     'title' => [
'text', $type],
   103                     'owner' => [
'integer', -1],
   104                     'create_date' => [
'timestamp', $db->now()],
   105                     'last_update' => [
'timestamp', $db->now()]
   107                 $db->insert(
'object_data', $fields);
   111                 "SELECT typ_id, ops_id " . PHP_EOL
   112                 . 
"FROM rbac_ta" . PHP_EOL
   113                 . 
"WHERE typ_id = " . $db->quote($type_id, 
"integer") . PHP_EOL
   114                 . 
"AND ops_id = " . $db->quote($ops_id, 
'integer') . PHP_EOL
   117             $result = $db->query($sql);
   118             if ($db->numRows($result)) {
   123                 "typ_id" => [
"integer", $type_id],
   124                 "ops_id" => [
"integer", $ops_id]
   127             $db->insert(
"rbac_ta", $values);
 
initEnvironment(Setup\Environment $environment)
 
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g. 
 
static _getCustomRBACOperationId(string $operation, \ilDBInterface $ilDB=null)
 
An environment holds resources to be used in the setup process. 
 
static _getObjectTypeIdByTitle(string $type, \ilDBInterface $ilDB=null)
 
 
 
 
◆ getHash()
      
        
          | ilAccessCustomRBACOperationAddedObjective::getHash  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getLabel()
      
        
          | ilAccessCustomRBACOperationAddedObjective::getLabel  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getPreconditions()
      
        
          | ilAccessCustomRBACOperationAddedObjective::getPreconditions  | 
          ( | 
          Environment  | 
          $environment | ) | 
           | 
        
      
 
 
◆ initEnvironment()
  
  
      
        
          | ilAccessCustomRBACOperationAddedObjective::initEnvironment  | 
          ( | 
          Setup\Environment  | 
          $environment | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ isApplicable()
      
        
          | ilAccessCustomRBACOperationAddedObjective::isApplicable  | 
          ( | 
          Environment  | 
          $environment | ) | 
           | 
        
      
 
Definition at line 134 of file class.ilAccessCustomRBACOperationAddedObjective.php.
References $dic, ILIAS\LTI\ToolProvider\$key, ilRbacReview\_getCustomRBACOperationId(), ilObject\_getObjectTypeIdByTitle(), ILIAS\Setup\Environment\getResource(), initEnvironment(), and resetDIC().
  136         $db = $environment->
getResource(Environment::RESOURCE_DATABASE);
   145         foreach ($this->types as 
$key => $type) {
   147             if (is_null($type_id)) {
   152                 "SELECT typ_id, ops_id " . PHP_EOL
   153                 . 
"FROM rbac_ta" . PHP_EOL
   154                 . 
"WHERE typ_id = " . $db->quote($type_id, 
"integer") . PHP_EOL
   155                 . 
"AND ops_id = " . $db->quote($ops_id, 
'integer') . PHP_EOL
   158             $result = $db->query($sql);
   159             if ($db->numRows($result)) {
   160                 unset($this->types[
$key]);
   165         return count($this->types) && in_array($this->
class, [
'create', 
'object', 
'general']);
 initEnvironment(Setup\Environment $environment)
 
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g. 
 
static _getCustomRBACOperationId(string $operation, \ilDBInterface $ilDB=null)
 
static _getObjectTypeIdByTitle(string $type, \ilDBInterface $ilDB=null)
 
 
 
 
◆ isNotable()
      
        
          | ilAccessCustomRBACOperationAddedObjective::isNotable  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ resetDIC()
  
  
      
        
          | ilAccessCustomRBACOperationAddedObjective::resetDIC  | 
          ( | 
            | 
          $dic | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ $class
  
  
      
        
          | string ilAccessCustomRBACOperationAddedObjective::$class | 
         
       
   | 
  
protected   | 
  
 
 
◆ $id
  
  
      
        
          | string ilAccessCustomRBACOperationAddedObjective::$id | 
         
       
   | 
  
protected   | 
  
 
 
◆ $pos
  
  
      
        
          | int ilAccessCustomRBACOperationAddedObjective::$pos | 
         
       
   | 
  
protected   | 
  
 
 
◆ $title
  
  
      
        
          | string ilAccessCustomRBACOperationAddedObjective::$title | 
         
       
   | 
  
protected   | 
  
 
 
◆ $types
  
  
      
        
          | array ilAccessCustomRBACOperationAddedObjective::$types | 
         
       
   | 
  
protected   | 
  
 
 
◆ NO_DIC_FOUND
  
  
      
        
          | const ilAccessCustomRBACOperationAddedObjective::NO_DIC_FOUND = 'There is no $DIC.' | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: