ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMMItemStorage Class Reference

Class ilMMItemStorage. More...

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

Public Member Functions

 create ()
 
 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
 getCacheIdentifier ()
 
 getTTL ()
 
 __construct (mixed $primary_key=0, ?arConnector $arConnector=null)
 
 afterObjectLoad ()
 
 create ()
 
 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 (mixed $primary_key=0)
 
 storeObjectToCache ()
 
 asStdClass ()
 
 asArray ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, string $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=[])
 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=[])
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $activeRecord, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static innerjoin (string $tablename, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static leftjoin (string $tablename, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static orderBy (string $orderBy, string $orderDirection='ASC')
 
static dateFormat (string $date_format='d.m.Y - H:i:s')
 
static limit (int $start, int $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $arConnector)
 
static raw (bool $set_raw=true)
 
static getArray (?string $key=null, string|array|null $values=null)
 
static _toCamelCase (string $str, bool $capitalise_first_char=false)
 

Protected Attributes

string $identification = null
 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 62 of file class.ilMMItemStorage.php.

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

62  : void
63  {
64  if (self::find($this->getIdentification()) !== null) {
65  $this->update();
66  } else {
67  parent::create();
68  }
69  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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, and null.

185  : ?string
186  {
187  return $this->icon_id === '' ? null : $this->icon_id;
188  }
string $icon_id
true text 256
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ 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  }
string $identification
true true true text 64
+ 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  }
string $parent_identification
true text 256

◆ getPosition()

ilMMItemStorage::getPosition ( )
Returns
int

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

References $position.

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

◆ isActive()

ilMMItemStorage::isActive ( )
Returns
bool

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

References $active.

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

◆ register()

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

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

References null.

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

38  {
39  if ($item instanceof Lost) {
40  return new self();
41  }
42 
43  $mm_item = ilMMItemStorage::find($item->getProviderIdentification()->serialize());
44  if ($mm_item === null) {
45  $mm_item = new ilMMItemStorage();
46  $mm_item->setPosition($item->getPosition());
47  $mm_item->setIdentification($item->getProviderIdentification()->serialize());
48  $mm_item->setActive(true);
49  if ($item instanceof isChild) {
50  $mm_item->setParentIdentification($item->getParent()->serialize());
51  }
52  $mm_item->create();
53  }
54 
55  return $mm_item;
56  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 140 of file class.ilMMItemStorage.php.

References $active.

140  : void
141  {
142  $this->active = $active;
143  }
bool $active
true integer 1

◆ 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  }
string $icon_id
true text 256

◆ setIdentification()

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

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

References $identification.

122  : void
123  {
124  $this->identification = $identification;
125  }
string $identification
true true true text 64

◆ setParentIdentification()

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

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

References $parent_identification.

176  : void
177  {
178  $this->parent_identification = $parent_identification;
179  }
string $parent_identification
true text 256

◆ setPosition()

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

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

References $position.

158  : void
159  {
160  $this->position = $position;
161  }
int $position
true integer 4

Field Documentation

◆ $active

bool ilMMItemStorage::$active = true
protected

true integer 1

Definition at line 85 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 107 of file class.ilMMItemStorage.php.

◆ $icon_id

string ilMMItemStorage::$icon_id = ''
protected

true text 256

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

Referenced by getIconId(), and setIconId().

◆ $identification

string ilMMItemStorage::$identification = null
protected

true true true text 64

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

Referenced by getIdentification(), and setIdentification().

◆ $parent_identification

string ilMMItemStorage::$parent_identification = ''
protected

true text 256

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

Referenced by getParentIdentification(), and setParentIdentification().

◆ $position

int ilMMItemStorage::$position = 0
protected

true integer 4

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

Referenced by getPosition(), and setPosition().


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