ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 @inheritDoc More...
 
 afterObjectLoad ()
 
 create ()
 
 read ()
 
 update ()
 
 delete ()
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 @description 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 ()
 @depracated 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
 @con_is_primary true @con_is_unique true @con_has_field true @con_fieldtype text @con_length 64 More...
 
bool $active = true
 @con_has_field true @con_fieldtype integer @con_length 1 More...
 
int $position = 0
 @con_has_field true @con_fieldtype integer @con_length 4 More...
 
string $parent_identification = ''
 @con_has_field true @con_fieldtype text @con_length 256 More...
 
string $icon_id = ''
 @con_has_field true @con_fieldtype text @con_length 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 ()
 @description Returns an instance of the instatiated calling active record (needs to be done in static methods) @TODO : This should be cached somehow More...
 
static fromCamelCase (string $str)
 

Detailed Description

Member Function Documentation

◆ create()

ilMMItemStorage::create ( )

Reimplemented from CachedActiveRecord.

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

57 : void
58 {
59 parent::create();
60 if (self::find($this->getIdentification()) !== null) {
61 $this->update();
62 } else {
63 }
64 }

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

+ Here is the call graph for this function:

◆ getIconId()

ilMMItemStorage::getIconId ( )
Returns
string

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

153 : ?string
154 {
155 return $this->icon_id === '' ? null : $this->icon_id;
156 }
string $icon_id
@con_has_field true @con_fieldtype text @con_length 256

References $icon_id.

◆ getIdentification()

ilMMItemStorage::getIdentification ( )

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

102 : string
103 {
105 }
string $identification
@con_is_primary true @con_is_unique true @con_has_field true @con_fieldtype text @con_length 64

References $identification.

Referenced by create().

+ Here is the caller graph for this function:

◆ getParentIdentification()

ilMMItemStorage::getParentIdentification ( )

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

138 : string
139 {
141 }
string $parent_identification
@con_has_field true @con_fieldtype text @con_length 256

References $parent_identification.

◆ getPosition()

ilMMItemStorage::getPosition ( )

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

126 : int
127 {
128 return $this->position;
129 }
int $position
@con_has_field true @con_fieldtype integer @con_length 4

References $position.

◆ isActive()

ilMMItemStorage::isActive ( )

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

114 : bool
115 {
116 return $this->active;
117 }
bool $active
@con_has_field true @con_fieldtype integer @con_length 1

References $active.

◆ register()

static ilMMItemStorage::register ( isItem  $item)
static

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

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

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

+ Here is the caller graph for this function:

◆ setActive()

ilMMItemStorage::setActive ( bool  $active)

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

120 : void
121 {
122 $this->active = $active;
123 }

References $active.

◆ setIconId()

ilMMItemStorage::setIconId ( string  $icon_id)

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

160 {
161 $this->icon_id = $icon_id;
162
163 return $this;
164 }

References $icon_id.

◆ setIdentification()

ilMMItemStorage::setIdentification ( string  $identification)

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

108 : void
109 {
110 $this->identification = $identification;
111 }

References $identification.

◆ setParentIdentification()

ilMMItemStorage::setParentIdentification ( string  $parent_identification)

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

144 : void
145 {
146 $this->parent_identification = $parent_identification;
147 }

References $parent_identification.

◆ setPosition()

ilMMItemStorage::setPosition ( int  $position)

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

132 : void
133 {
134 $this->position = $position;
135 }

References $position.

Field Documentation

◆ $active

bool ilMMItemStorage::$active = true
protected

@con_has_field true @con_fieldtype integer @con_length 1

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

◆ $icon_id

string ilMMItemStorage::$icon_id = ''
protected

@con_has_field true @con_fieldtype text @con_length 256

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

Referenced by getIconId(), and setIconId().

◆ $identification

string ilMMItemStorage::$identification = null
protected

@con_is_primary true @con_is_unique true @con_has_field true @con_fieldtype text @con_length 64

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

Referenced by getIdentification(), and setIdentification().

◆ $parent_identification

string ilMMItemStorage::$parent_identification = ''
protected

@con_has_field true @con_fieldtype text @con_length 256

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

Referenced by getParentIdentification(), and setParentIdentification().

◆ $position

int ilMMItemStorage::$position = 0
protected

@con_has_field true @con_fieldtype integer @con_length 4

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

Referenced by getPosition(), and setPosition().


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