ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
|
Public Member Functions | |
__construct (int $webr_id) | |
createItem (ilWebLinkDraftItem $item) | |
Creates a new item, complete with parameters. More... | |
createList (ilWebLinkDraftList $list) | |
createAllItemsInDraftContainer (ilWebLinkDraftItemsContainer $container) | |
getAllItemsAsContainer (bool $only_active=false) | |
getItemByLinkId (int $link_id) | |
doesOnlyOneItemExist (bool $only_active=false) | |
getParameterinItemByParamId (ilWebLinkItem $item, int $param_id) | |
getList () | |
doesListExist () | |
updateItem (ilWebLinkItem $item, ilWebLinkDraftItem $drafted_item) | |
Updates an item. More... | |
updateList (ilWebLinkList $list, ilWebLinkDraftList $drafted_list) | |
deleteAllItems () | |
deleteItemByLinkID (int $link_id) | |
deleteParameterByLinkIdAndParamId (int $link_id, int $param_id) | |
deleteList () | |
getWebrId () | |
Data Fields | |
const string | ITEMS_TABLE = 'webr_items' |
const string | LISTS_TABLE = 'webr_lists' |
const string | PARAMS_TABLE = 'webr_params' |
Protected Member Functions | |
getParametersByLinkId (int $link_id) | |
validateParameter (ilWebLinkBaseParameter $parameter) | |
validateInternalItemTarget (ilWebLinkDraftItem $item) | |
isInternalLink (string $value) | |
getCurrentTime () | |
getNewDateTimeImmutable () | |
Protected Attributes | |
int | $webr_id |
ilDBInterface | $db |
ilObjUser | $user |
Definition at line 24 of file class.ilWebLinkDatabaseRepository.php.
ilWebLinkDatabaseRepository::__construct | ( | int | $webr_id | ) |
Definition at line 34 of file class.ilWebLinkDatabaseRepository.php.
References $DIC, $webr_id, and ILIAS\Repository\user().
ilWebLinkDatabaseRepository::createAllItemsInDraftContainer | ( | ilWebLinkDraftItemsContainer | $container | ) |
Implements ilWebLinkRepository.
Definition at line 149 of file class.ilWebLinkDatabaseRepository.php.
References createItem(), ilWebLinkDraftItemsContainer\getItems(), and getWebrId().
Referenced by ilObjLinkResource\cloneObject().
ilWebLinkDatabaseRepository::createItem | ( | ilWebLinkDraftItem | $item | ) |
Creates a new item, complete with parameters.
New parameters cannot be created on their own, but only by adding them as drafts to a drafted item, and then updating or creating with it.
Implements ilWebLinkRepository.
Definition at line 43 of file class.ilWebLinkDatabaseRepository.php.
References Vendor\Package\$e, ilWebLinkBaseItem\getDescription(), getNewDateTimeImmutable(), ilWebLinkBaseItem\getParameters(), ilWebLinkBaseItem\getTarget(), ilWebLinkBaseItem\getTitle(), getWebrId(), ILIAS\Repository\int(), ilWebLinkBaseItem\isActive(), ilWebLinkDraftItem\isInternal(), ILIAS\Repository\user(), validateInternalItemTarget(), and validateParameter().
Referenced by ilObjLinkResourceGUI\afterSave(), and createAllItemsInDraftContainer().
ilWebLinkDatabaseRepository::createList | ( | ilWebLinkDraftList | $list | ) |
Implements ilWebLinkRepository.
Definition at line 123 of file class.ilWebLinkDatabaseRepository.php.
References ilWebLinkBaseList\getDescription(), getNewDateTimeImmutable(), ilWebLinkBaseList\getTitle(), and getWebrId().
ilWebLinkDatabaseRepository::deleteAllItems | ( | ) |
Implements ilWebLinkRepository.
Definition at line 435 of file class.ilWebLinkDatabaseRepository.php.
References getWebrId().
ilWebLinkDatabaseRepository::deleteItemByLinkID | ( | int | $link_id | ) |
Implements ilWebLinkRepository.
Definition at line 448 of file class.ilWebLinkDatabaseRepository.php.
References getWebrId().
ilWebLinkDatabaseRepository::deleteList | ( | ) |
Implements ilWebLinkRepository.
Definition at line 475 of file class.ilWebLinkDatabaseRepository.php.
References $res, and getWebrId().
ilWebLinkDatabaseRepository::deleteParameterByLinkIdAndParamId | ( | int | $link_id, |
int | $param_id | ||
) |
Implements ilWebLinkRepository.
Definition at line 463 of file class.ilWebLinkDatabaseRepository.php.
References getWebrId().
Referenced by updateItem().
ilWebLinkDatabaseRepository::doesListExist | ( | ) |
Implements ilWebLinkRepository.
Definition at line 302 of file class.ilWebLinkDatabaseRepository.php.
References $res, ilDBConstants\FETCHMODE_OBJECT, and getWebrId().
ilWebLinkDatabaseRepository::doesOnlyOneItemExist | ( | bool | $only_active = false | ) |
Implements ilWebLinkRepository.
Definition at line 238 of file class.ilWebLinkDatabaseRepository.php.
References ilDBConstants\FETCHMODE_OBJECT, and getWebrId().
ilWebLinkDatabaseRepository::getAllItemsAsContainer | ( | bool | $only_active = false | ) |
Implements ilWebLinkRepository.
Definition at line 163 of file class.ilWebLinkDatabaseRepository.php.
References $res, ilDBConstants\FETCHMODE_OBJECT, getNewDateTimeImmutable(), getParametersByLinkId(), getWebrId(), and null.
|
protected |
Definition at line 555 of file class.ilWebLinkDatabaseRepository.php.
Referenced by updateItem(), and updateList().
ilWebLinkDatabaseRepository::getItemByLinkId | ( | int | $link_id | ) |
Implements ilWebLinkRepository.
Definition at line 203 of file class.ilWebLinkDatabaseRepository.php.
References $res, ilDBConstants\FETCHMODE_OBJECT, getNewDateTimeImmutable(), getParametersByLinkId(), getWebrId(), and null.
ilWebLinkDatabaseRepository::getList | ( | ) |
Implements ilWebLinkRepository.
Definition at line 280 of file class.ilWebLinkDatabaseRepository.php.
References $res, ilDBConstants\FETCHMODE_OBJECT, getNewDateTimeImmutable(), getWebrId(), and null.
|
protected |
Definition at line 560 of file class.ilWebLinkDatabaseRepository.php.
Referenced by createItem(), createList(), getAllItemsAsContainer(), getItemByLinkId(), and getList().
ilWebLinkDatabaseRepository::getParameterinItemByParamId | ( | ilWebLinkItem | $item, |
int | $param_id | ||
) |
Implements ilWebLinkRepository.
Definition at line 253 of file class.ilWebLinkDatabaseRepository.php.
References $res, ilDBConstants\FETCHMODE_OBJECT, ilWebLinkItem\getLinkId(), getWebrId(), and ILIAS\Repository\user().
|
protected |
Definition at line 486 of file class.ilWebLinkDatabaseRepository.php.
References Vendor\Package\$e, $res, ilDBConstants\FETCHMODE_OBJECT, getWebrId(), ILIAS\Repository\user(), and validateParameter().
Referenced by getAllItemsAsContainer(), and getItemByLinkId().
ilWebLinkDatabaseRepository::getWebrId | ( | ) |
Definition at line 550 of file class.ilWebLinkDatabaseRepository.php.
References $webr_id.
Referenced by createAllItemsInDraftContainer(), createItem(), createList(), deleteAllItems(), deleteItemByLinkID(), deleteList(), deleteParameterByLinkIdAndParamId(), doesListExist(), doesOnlyOneItemExist(), getAllItemsAsContainer(), getItemByLinkId(), getList(), getParameterinItemByParamId(), getParametersByLinkId(), updateItem(), and updateList().
|
protected |
Definition at line 545 of file class.ilWebLinkDatabaseRepository.php.
References ilLinkInputGUI\isInternalLink().
Referenced by validateInternalItemTarget().
ilWebLinkDatabaseRepository::updateItem | ( | ilWebLinkItem | $item, |
ilWebLinkDraftItem | $drafted_item | ||
) |
Updates an item.
New parameters added as drafts update the parameter they replace, or else are created fresh. Current parameters of the item not added to the draft are deleted.
Implements ilWebLinkRepository.
Definition at line 314 of file class.ilWebLinkDatabaseRepository.php.
References Vendor\Package\$e, deleteParameterByLinkIdAndParamId(), getCurrentTime(), ilWebLinkBaseItem\getDescription(), ilWebLinkItem\getLinkId(), ilWebLinkBaseItem\getParameters(), ilWebLinkItem\getParameters(), ilWebLinkBaseItem\getTarget(), ilWebLinkBaseItem\getTitle(), ilWebLinkItem\getWebrId(), getWebrId(), ILIAS\Repository\int(), ilWebLinkBaseItem\isActive(), ilWebLinkDraftItem\isInternal(), validateInternalItemTarget(), and validateParameter().
ilWebLinkDatabaseRepository::updateList | ( | ilWebLinkList | $list, |
ilWebLinkDraftList | $drafted_list | ||
) |
Implements ilWebLinkRepository.
Definition at line 412 of file class.ilWebLinkDatabaseRepository.php.
References getCurrentTime(), ilWebLinkBaseList\getDescription(), ilWebLinkBaseList\getTitle(), ilWebLinkList\getWebrId(), and getWebrId().
|
protected |
ilWebLinkDatabaseRepositoryException |
Definition at line 533 of file class.ilWebLinkDatabaseRepository.php.
References ilWebLinkBaseItem\getTarget(), ilWebLinkDraftItem\isInternal(), and isInternalLink().
Referenced by createItem(), and updateItem().
|
protected |
ilWebLinkDatabaseRepositoryException |
Definition at line 518 of file class.ilWebLinkDatabaseRepository.php.
References ilWebLinkBaseParameter\getValue(), and ilWebLinkBaseParameter\VALUES.
Referenced by createItem(), getParametersByLinkId(), and updateItem().
|
protected |
Definition at line 31 of file class.ilWebLinkDatabaseRepository.php.
|
protected |
Definition at line 32 of file class.ilWebLinkDatabaseRepository.php.
|
protected |
Definition at line 30 of file class.ilWebLinkDatabaseRepository.php.
Referenced by __construct(), and getWebrId().
const string ilWebLinkDatabaseRepository::ITEMS_TABLE = 'webr_items' |
Definition at line 26 of file class.ilWebLinkDatabaseRepository.php.
Referenced by ilWebResourceDatabaseRepositoryTest\testCreateExternalItem(), ilWebResourceDatabaseRepositoryTest\testCreateInternalItemWithBrokenParameter(), and ilWebResourceDatabaseRepositoryTest\testCreateItemBrokenInternalLinkException().
const string ilWebLinkDatabaseRepository::LISTS_TABLE = 'webr_lists' |
Definition at line 27 of file class.ilWebLinkDatabaseRepository.php.
Referenced by ilWebResourceDatabaseRepositoryTest\testCreateList().
const string ilWebLinkDatabaseRepository::PARAMS_TABLE = 'webr_params' |
Definition at line 28 of file class.ilWebLinkDatabaseRepository.php.
Referenced by ilWebResourceDatabaseRepositoryTest\testCreateExternalItem(), and ilWebResourceDatabaseRepositoryTest\testCreateInternalItemWithBrokenParameter().