ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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)
 
- 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 = ''
 
 $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 41 of file class.ilMMItemStorage.php.

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

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

◆ getCache()

ilMMItemStorage::getCache ( )

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

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

+ Here is the call graph for this function:

◆ getIdentification()

ilMMItemStorage::getIdentification ( )
Returns
string

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

References $identification.

Referenced by create().

103  : string
104  {
105  return $this->identification;
106  }
+ Here is the caller graph for this function:

◆ getParentIdentification()

ilMMItemStorage::getParentIdentification ( )
Returns
string

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

References $parent_identification.

157  : string
158  {
160  }

◆ getPosition()

ilMMItemStorage::getPosition ( )
Returns
int

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

References $position.

139  : int
140  {
141  return $this->position;
142  }

◆ isActive()

ilMMItemStorage::isActive ( )
Returns
bool

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

References $active.

121  : bool
122  {
123  return $this->active;
124  }

◆ 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 ilMMCustomProvider\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 BaseForm.
getPosition()
Return the default position for installation, this will be overridden by the configuration later...
Class ilMMItemStorage.
+ 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 130 of file class.ilMMItemStorage.php.

References $active.

131  {
132  $this->active = $active;
133  }

◆ setIdentification()

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

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

References $identification.

113  {
114  $this->identification = $identification;
115  }

◆ setParentIdentification()

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

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

References $parent_identification.

167  {
168  $this->parent_identification = $parent_identification;
169  }

◆ setPosition()

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

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

References $position.

149  {
150  $this->position = $position;
151  }

Field Documentation

◆ $active

ilMMItemStorage::$active = true
protected

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

Referenced by isActive(), and setActive().

◆ $connector_container_name

ilMMItemStorage::$connector_container_name = "il_mm_items"
protected

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

◆ $identification

ilMMItemStorage::$identification
protected

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

Referenced by getIdentification(), and setIdentification().

◆ $parent_identification

ilMMItemStorage::$parent_identification = ''
protected

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

Referenced by getParentIdentification(), and setParentIdentification().

◆ $position

ilMMItemStorage::$position = 0
protected

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

Referenced by getPosition(), and setPosition().


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