Class ilMMItemRepository.
More...
◆ __construct()
ilMMItemRepository::__construct |
( |
| ) |
|
ilMMItemRepository constructor.
- Exceptions
-
Definition at line 46 of file class.ilMMItemRepository.php.
References $DIC, ilMMItemStorage\register(), and sync().
50 $this->main_collector = $DIC->globalScreen()->collector()->mainmenu();
51 $this->services = $DIC->globalScreen();
53 foreach ($this->main_collector->getStackedTopItemsForPresentation() as $top_item) {
56 foreach ($top_item->getChildren() as $child) {
static register(isItem $item)
◆ clearCache()
ilMMItemRepository::clearCache |
( |
| ) |
|
◆ createItem()
◆ deleteItem()
◆ flushLostItems()
ilMMItemRepository::flushLostItems |
( |
| ) |
|
Definition at line 166 of file class.ilMMItemRepository.php.
References getItemFacade(), getSubItemsForTable(), and getTopItems().
169 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
170 if (Lost::class === $item_facade->getType()) {
171 $item_facade->delete();
176 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
177 if (Lost::class === $item_facade->getType()) {
178 $item_facade->delete();
getItemFacade(IdentificationInterface $identification=null)
◆ getEmptyItemForTypeString()
ilMMItemRepository::getEmptyItemForTypeString |
( |
string |
$class_name | ) |
|
◆ getItemFacade()
◆ getItemFacadeForIdentificationString()
ilMMItemRepository::getItemFacadeForIdentificationString |
( |
string |
$identification | ) |
|
- Parameters
-
- Returns
- ilMMItemFacadeInterface
- Exceptions
-
Definition at line 227 of file class.ilMMItemRepository.php.
References $id, and getItemFacade().
229 $id = $this->services->identification()->fromSerializedIdentification($identification);
if(!array_key_exists('StateId', $_REQUEST)) $id
getItemFacade(IdentificationInterface $identification=null)
Interface ilMMItemFacadeInterface.
◆ getPossibleParentsForFormAndTable()
ilMMItemRepository::getPossibleParentsForFormAndTable |
( |
| ) |
|
Definition at line 235 of file class.ilMMItemRepository.php.
References $data, getItemFacade(), getSingleItem(), and getTopItems().
238 if (is_null($parents)) {
241 $identification = $this->services->identification()->fromSerializedIdentification($top_item_identification);
244 $parents[$top_item_identification] = $this->
getItemFacade($identification)
getItemFacade(IdentificationInterface $identification=null)
getSingleItem(IdentificationInterface $identification)
◆ getPossibleSubItemTypesForForm()
ilMMItemRepository::getPossibleSubItemTypesForForm |
( |
| ) |
|
◆ getPossibleSubItemTypesWithInformation()
ilMMItemRepository::getPossibleSubItemTypesWithInformation |
( |
| ) |
|
- Returns
- []
Definition at line 279 of file class.ilMMItemRepository.php.
282 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
283 if ($information->isCreationPrevented()) {
286 if ($information->isChild()) {
287 $types[$information->getType()] = $information;
◆ getPossibleTopItemTypesForForm()
ilMMItemRepository::getPossibleTopItemTypesForForm |
( |
| ) |
|
◆ getPossibleTopItemTypesWithInformation()
ilMMItemRepository::getPossibleTopItemTypesWithInformation |
( |
| ) |
|
- Returns
- []
Definition at line 316 of file class.ilMMItemRepository.php.
319 foreach ($this->main_collector->getTypeInformationCollection()->getAll() as $information) {
320 if ($information->isTop()) {
321 $types[$information->getType()] = $information;
◆ getSingleItem()
◆ getStackedTopItemsForPresentation()
ilMMItemRepository::getStackedTopItemsForPresentation |
( |
| ) |
|
- Returns
- TopLinkItem[]|TopParentItem[]
- Exceptions
-
Definition at line 108 of file class.ilMMItemRepository.php.
110 $top_items = $this->main_collector->getStackedTopItemsForPresentation();
◆ getSubItemsForTable()
ilMMItemRepository::getSubItemsForTable |
( |
| ) |
|
- Returns
- array
Definition at line 150 of file class.ilMMItemRepository.php.
References $data, and $r.
Referenced by flushLostItems(), and hasLostItems().
152 $r = $this->storage->db()->query(
153 "SELECT sub_items.*, top_items.position AS parent_position 154 FROM il_mm_items AS sub_items 155 LEFT JOIN il_mm_items AS top_items ON top_items.identification = sub_items.parent_identification 156 WHERE sub_items.parent_identification != '' ORDER BY top_items.position, parent_identification, sub_items.position ASC" 159 while (
$data = $this->storage->db()->fetchAssoc(
$r)) {
◆ getTopItems()
ilMMItemRepository::getTopItems |
( |
| ) |
|
◆ getTypeHandlerForType()
ilMMItemRepository::getTypeHandlerForType |
( |
string |
$type | ) |
|
◆ hasLostItems()
ilMMItemRepository::hasLostItems |
( |
| ) |
|
Definition at line 183 of file class.ilMMItemRepository.php.
References getItemFacade(), getSubItemsForTable(), and getTopItems().
186 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
187 if (Lost::class === $item_facade->getType()) {
193 $item_facade = $this->
getItemFacade($this->services->identification()->fromSerializedIdentification($item[
'identification']));
194 if (Lost::class === $item_facade->getType()) {
getItemFacade(IdentificationInterface $identification=null)
◆ repository()
ilMMItemRepository::repository |
( |
| ) |
|
◆ sync()
ilMMItemRepository::sync |
( |
| ) |
|
|
private |
◆ updateItem()
◆ $main_collector
ilMMItemRepository::$main_collector |
|
private |
◆ $services
ilMMItemRepository::$services |
|
private |
◆ $storage
ilMMItemRepository::$storage |
|
private |
◆ $synced
ilMMItemRepository::$synced = false |
|
private |
The documentation for this class was generated from the following file: