ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ()
 
 storeObjectToCache ()
 
 buildFromArray (array $array)
 
 store ()
 
 save ()
 
 create ()
 
 copy ($new_id=0)
 
 read ()
 
 update ()
 
 delete ()
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 
 setConnectorContainerName ($connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0, arConnector $connector=null)
 
 storeObjectToCache ()
 
 __getConvertedDateFieldsAsArray ($format=null)
 
 __asCsv ($separator=';', $header=false)
 
 __asArray ()
 
 __asStdClass ()
 
 __asSerializedObject ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForDb ()
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy ($new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static register (isItem $item)
 
- Static Public Member Functions inherited from CachedActiveRecord
static find ($primary_key, array $add_constructor_args=array())
 
static connector (arConnector $connector)
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField ($old_name, $new_name)
 
static tableExists ()
 
static fieldExists ($field_name)
 
static removeDBField ($field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 
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, $fields=array(' *'), $operator='=', $both_external=false)
 
static innerjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static leftjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static orderBy ($orderBy, $orderDirection='ASC')
 
static dateFormat ($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 ($set_raw=true)
 
static getArray ($key=null, $values=null)
 
static _toCamelCase ($str, $capitalise_first_char=false)
 

Protected Attributes

 $identification
 
 $active = true
 
 $position = 0
 
 $parent_identification = ''
 
 $icon_id = ''
 
 $connector_container_name = "il_mm_items"
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Additional Inherited Members

- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 
- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv. More...
 
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 
static fromCamelCase ($str)
 

Detailed Description

Member Function Documentation

◆ create()

ilMMItemStorage::create ( )

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

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

44  {
45  if (self::find($this->getIdentification())) {
46  $this->update();
47  } else {
48  parent::create();
49  }
50  }
+ Here is the call graph for this function:

◆ getCache()

ilMMItemStorage::getCache ( )

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

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

57  {
59  }
static getInstance($component)
Class ilGlobalCache.
+ Here is the call graph for this function:

◆ getIconId()

ilMMItemStorage::getIconId ( )
Returns
string

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

References $icon_id.

185  : ?string
186  {
187  return $this->icon_id;
188  }

◆ getIdentification()

ilMMItemStorage::getIdentification ( )
Returns
string

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

References $identification.

Referenced by create().

113  : string
114  {
115  return $this->identification;
116  }
+ Here is the caller graph for this function:

◆ getParentIdentification()

ilMMItemStorage::getParentIdentification ( )
Returns
string

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

References $parent_identification.

167  : string
168  {
170  }

◆ getPosition()

ilMMItemStorage::getPosition ( )
Returns
int

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

References $position.

149  : int
150  {
151  return $this->position;
152  }

◆ isActive()

ilMMItemStorage::isActive ( )
Returns
bool

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

References $active.

131  : bool
132  {
133  return $this->active;
134  }

◆ register()

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

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

References CachedActiveRecord\find().

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

20  {
21  if ($item instanceof Lost) {
22  return new self();
23  }
24 
25  $mm_item = ilMMItemStorage::find($item->getProviderIdentification()->serialize());
26  if ($mm_item === null) {
27  $mm_item = new ilMMItemStorage();
28  $mm_item->setPosition($item->getPosition());
29  $mm_item->setIdentification($item->getProviderIdentification()->serialize());
30  $mm_item->setActive(true);
31  if ($item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild) {
32  $mm_item->setParentIdentification($item->getParent()->serialize());
33  }
34  $mm_item->create();
35  }
36 
37  return $mm_item;
38  }
static find($primary_key, array $add_constructor_args=array())
Class ChatMainBarProvider .
getPosition()
Return the default position for installation, this will be overridden by the configuration later...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActive()

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

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

References $active.

141  {
142  $this->active = $active;
143  }

◆ setIconId()

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

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

References $icon_id.

197  {
198  $this->icon_id = $icon_id;
199 
200  return $this;
201  }

◆ setIdentification()

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

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

References $identification.

123  {
124  $this->identification = $identification;
125  }

◆ setParentIdentification()

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

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

References $parent_identification.

177  {
178  $this->parent_identification = $parent_identification;
179  }

◆ setPosition()

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

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

References $position.

159  {
160  $this->position = $position;
161  }

Field Documentation

◆ $active

ilMMItemStorage::$active = true
protected

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

Referenced by isActive(), and setActive().

◆ $connector_container_name

ilMMItemStorage::$connector_container_name = "il_mm_items"
protected

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

◆ $icon_id

ilMMItemStorage::$icon_id = ''
protected

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

Referenced by getIconId(), and setIconId().

◆ $identification

ilMMItemStorage::$identification
protected

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

Referenced by getIdentification(), and setIdentification().

◆ $parent_identification

ilMMItemStorage::$parent_identification = ''
protected

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

Referenced by getParentIdentification(), and setParentIdentification().

◆ $position

ilMMItemStorage::$position = 0
protected

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

Referenced by getPosition(), and setPosition().


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