ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMMItemStorage Class Reference

Class ilMMItemStorage. More...

+ Inheritance diagram for ilMMItemStorage:
+ Collaboration diagram for ilMMItemStorage:

Public Member Functions

 create ()
 
 getCache ()
 
 getIdentification ()
 
 setIdentification (string $identification)
 
 isActive ()
 
 setActive (bool $active)
 
 getPosition ()
 
 setPosition (int $position)
 
 getParentIdentification ()
 
 setParentIdentification (string $parent_identification)
 
 getIconId ()
 
 setIconId (string $icon_id)
 
- Public Member Functions inherited from CachedActiveRecord
 getCache ()
 
 getCacheIdentifier ()
 
 getTTL ()
 
 __construct ($primary_key=0, arConnector $connector=null)
 
 afterObjectLoad ()
 
 create ()
 
 copy (int $new_id=0)
 
 read ()
 
 update ()
 
 delete ()
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 Return the Name of your Connector Table More...
 
 setConnectorContainerName (string $connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0)
 
 storeObjectToCache ()
 
 asStdClass ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy (int $new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static register (isItem $item)
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField (string $old_name, string $new_name)
 
static tableExists ()
 
static fieldExists (string $field_name)
 
static removeDBField (string $field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 never use in ILIAS Core, Plugins only More...
 
static preloadObjects ()
 
static additionalParams (array $additional_params)
 
static findOrFail ($primary_key, array $add_constructor_args=array())
 Tries to find the object and throws an Exception if object is not found, instead of returning null. More...
 
static findOrGetInstance ($primary_key, array $add_constructor_args=array())
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $ar, $on_this, $on_external, array $fields=array(' *'), string $operator='=', $both_external=false)
 
static innerjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static leftjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static orderBy ($orderBy, string $orderDirection='ASC')
 
static dateFormat (string $date_format='d.m.Y - H:i:s')
 
static limit ($start, $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $connector)
 
static raw (bool $set_raw=true)
 
static getArray (?string $key=null, $values=null)
 
static _toCamelCase (string $str, bool $capitalise_first_char=false)
 

Protected Attributes

string $identification
 true true true text 64 More...
 
bool $active = true
 true integer 1 More...
 
int $position = 0
 true integer 4 More...
 
string $parent_identification = ''
 true text 256 More...
 
string $icon_id = ''
 true text 256 More...
 
string $connector_container_name = "il_mm_items"
 
- Protected Attributes inherited from ActiveRecord
bool $ar_safe_read = true
 
string $connector_container_name = ''
 
bool $is_new = true
 

Additional Inherited Members

- Protected Member Functions inherited from ActiveRecord
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 Returns an instance of the instatiated calling active record (needs to be done in static methods) : This should be cached somehow More...
 
static fromCamelCase (string $str)
 

Detailed Description

Member Function Documentation

◆ create()

ilMMItemStorage::create ( )

Definition at line 58 of file class.ilMMItemStorage.php.

References getIdentification(), and CachedActiveRecord\update().

58  : void
59  {
60  if (self::find($this->getIdentification())) {
61  $this->update();
62  } else {
63  parent::create();
64  }
65  }
+ Here is the call graph for this function:

◆ getCache()

ilMMItemStorage::getCache ( )

Definition at line 71 of file class.ilMMItemStorage.php.

References ilGlobalCache\COMP_GLOBAL_SCREEN, and ilGlobalCache\getInstance().

72  {
74  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(?string $component)
+ Here is the call graph for this function:

◆ getIconId()

ilMMItemStorage::getIconId ( )
Returns
string

Definition at line 190 of file class.ilMMItemStorage.php.

References $icon_id.

190  : ?string
191  {
192  return $this->icon_id === '' ? null : $this->icon_id;
193  }
string $icon_id
true text 256

◆ getIdentification()

ilMMItemStorage::getIdentification ( )
Returns
string

Definition at line 118 of file class.ilMMItemStorage.php.

References $identification.

Referenced by create().

118  : string
119  {
120  return $this->identification;
121  }
string $identification
true true true text 64
+ Here is the caller graph for this function:

◆ getParentIdentification()

ilMMItemStorage::getParentIdentification ( )
Returns
string

Definition at line 172 of file class.ilMMItemStorage.php.

References $parent_identification.

172  : string
173  {
175  }
string $parent_identification
true text 256

◆ getPosition()

ilMMItemStorage::getPosition ( )
Returns
int

Definition at line 154 of file class.ilMMItemStorage.php.

References $position.

154  : int
155  {
156  return $this->position;
157  }
int $position
true integer 4

◆ isActive()

ilMMItemStorage::isActive ( )
Returns
bool

Definition at line 136 of file class.ilMMItemStorage.php.

References $active.

136  : bool
137  {
138  return $this->active;
139  }
bool $active
true integer 1

◆ register()

static ilMMItemStorage::register ( isItem  $item)
static
Parameters
isItem$item
Returns
ilMMItemStorage

Definition at line 34 of file class.ilMMItemStorage.php.

Referenced by ilMMAbstractItemFacade\__construct(), ilMMItemRepository\__construct(), ilMMAbstractItemFacade\create(), and ILIAS\MainMenu\Provider\CustomMainBarProvider\getSingleCustomItem().

35  {
36  if ($item instanceof Lost) {
37  return new self();
38  }
39 
40  $mm_item = ilMMItemStorage::find($item->getProviderIdentification()->serialize());
41  if ($mm_item === null) {
42  $mm_item = new ilMMItemStorage();
43  $mm_item->setPosition($item->getPosition());
44  $mm_item->setIdentification($item->getProviderIdentification()->serialize());
45  $mm_item->setActive(true);
46  if ($item instanceof isChild) {
47  $mm_item->setParentIdentification($item->getParent()->serialize());
48  }
49  $mm_item->create();
50  }
51 
52  return $mm_item;
53  }
getPosition()
Return the default position for installation, this will be overridden by the configuration later...
+ Here is the caller graph for this function:

◆ setActive()

ilMMItemStorage::setActive ( bool  $active)
Parameters
bool$active

Definition at line 145 of file class.ilMMItemStorage.php.

References $active.

146  {
147  $this->active = $active;
148  }
bool $active
true integer 1

◆ setIconId()

ilMMItemStorage::setIconId ( string  $icon_id)
Parameters
string$icon_id
Returns
ilMMItemStorage

Definition at line 201 of file class.ilMMItemStorage.php.

References $icon_id.

202  {
203  $this->icon_id = $icon_id;
204 
205  return $this;
206  }
string $icon_id
true text 256

◆ setIdentification()

ilMMItemStorage::setIdentification ( string  $identification)
Parameters
string$identification

Definition at line 127 of file class.ilMMItemStorage.php.

References $identification.

128  {
129  $this->identification = $identification;
130  }
string $identification
true true true text 64

◆ setParentIdentification()

ilMMItemStorage::setParentIdentification ( string  $parent_identification)
Parameters
string$parent_identification

Definition at line 181 of file class.ilMMItemStorage.php.

References $parent_identification.

182  {
183  $this->parent_identification = $parent_identification;
184  }
string $parent_identification
true text 256

◆ setPosition()

ilMMItemStorage::setPosition ( int  $position)
Parameters
int$position

Definition at line 163 of file class.ilMMItemStorage.php.

References $position.

164  {
165  $this->position = $position;
166  }
int $position
true integer 4

Field Documentation

◆ $active

bool ilMMItemStorage::$active = true
protected

true integer 1

Definition at line 90 of file class.ilMMItemStorage.php.

Referenced by isActive(), and setActive().

◆ $connector_container_name

string ilMMItemStorage::$connector_container_name = "il_mm_items"
protected

Definition at line 112 of file class.ilMMItemStorage.php.

◆ $icon_id

string ilMMItemStorage::$icon_id = ''
protected

true text 256

Definition at line 108 of file class.ilMMItemStorage.php.

Referenced by getIconId(), and setIconId().

◆ $identification

string ilMMItemStorage::$identification
protected

true true true text 64

Definition at line 84 of file class.ilMMItemStorage.php.

Referenced by getIdentification(), and setIdentification().

◆ $parent_identification

string ilMMItemStorage::$parent_identification = ''
protected

true text 256

Definition at line 102 of file class.ilMMItemStorage.php.

Referenced by getParentIdentification(), and setParentIdentification().

◆ $position

int ilMMItemStorage::$position = 0
protected

true integer 4

Definition at line 96 of file class.ilMMItemStorage.php.

Referenced by getPosition(), and setPosition().


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