19 declare(strict_types=1);
    46         private readonly ObjectTypeSpecificPropertiesFactory $object_type_specific_properties_factory
    50     public function preload(array $object_ids): void
    57         $this->data_cache = [];
    62         if ($object_id === null
    63             || $object_id === 0) {
    67         if (!isset($this->data_cache[$object_id])) {
    71         $data = $this->data_cache[$object_id];
    73         $object_type_specific_properties = $this->object_type_specific_properties_factory->getForObjectTypeString(
$data[
'type']);
    75         $modifications = null;
    76         if ($object_type_specific_properties !== null) {
    77             $providers = $object_type_specific_properties->getProviders();
    78             $modifications = $object_type_specific_properties->getModifications();
    92                     $this->storage_services,
    93                     $this->storage_stakeholder,
    94                     $this->flavour_definition,
   105             throw new \Exception(
'The current configuration cannot be saved.');
   111                 $properties->getPropertyTileImage()->withTileImage(
   112                     $properties->getPropertyTileImage()->getTileImage()->withRid(null)
   118             $properties->getPropertyTileImage()->getTileImage()->deleteLegacyTileImage();
   143         $this->database->update(self::CORE_PROPERTIES_TABLE, $storage_array, $where);
   145         if ($this->obj_definition->isRBACObject($properties->
getType())) {
   149         unset($this->data_cache[$properties->
getObjectId()]);
   156         if ($tile_image->
getRid() === null) {
   160         $i = $this->storage_services->manage()->find($tile_image->
getRid());
   165         $this->storage_services->manage()->remove(
   167             $this->storage_stakeholder
   185         $where = 
'WHERE obj.obj_id=' . $this->database->quote($object_id, 
'integer');
   189             throw new \Exception(
'The object with the following id does not exist: '   190                 . (
string) $object_id);
   193         return $data[$object_id];
   208             . 
'obj.obj_id, obj.type, obj.title, obj.description, obj.owner,' . PHP_EOL
   209             . 
'obj.create_date, obj.last_update, obj.import_id, obj.offline,' . PHP_EOL
   210             . 
'obj.tile_image_rid, descr.description' . PHP_EOL
   211             . 
'FROM ' . self::CORE_PROPERTIES_TABLE . 
' AS obj' . PHP_EOL
   212             . 
'LEFT JOIN ' . self::DESCRIPTION_TABLE . 
' AS descr' . PHP_EOL
   213             . 
'ON obj.obj_id = descr.obj_id' . PHP_EOL
   216         $statement = $this->database->query($query);
   217         $num_rows = $this->database->numRows($statement);
   219         if ($num_rows === 0) {
   224         while ($row = $this->database->fetchAssoc($statement)) {
   225             $data[$row[
'obj_id']] = [
   226                 'title' => $row[
'title'],
   227                 'long_description' => $row[
'description'] ?? 
'',
   228                 'is_online' => !((bool) $row[
'offline']),
   229                 'tile_image_rid' => $row[
'tile_image_rid'],
   230                 'object_id' => $row[
'obj_id'],
   231                 'type' => $row[
'type'],
   232                 'owner' => $row[
'owner'],
   233                 'import_id' => $row[
'import_id'],
   234                 'create_date' => $row[
'create_date'] !== null ? 
new DateTimeImmutable($row[
'create_date']) : null,
   235                 'update_date' => $row[
'last_update'] !== null ? 
new DateTimeImmutable($row[
'last_update']) : null
   244         $description_array = [
   247         $this->database->update(self::DESCRIPTION_TABLE, $description_array, $where);
 
const CORE_PROPERTIES_TABLE
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
storeLongDescription(string $long_description, array $where)
 
getPropertyTitleAndDescription()
 
retrieveDataForWhereClause(string $where)
 
retrieveDataForObjectIds(array $object_ids)
 
deleteOldTileImage(ilObjectTileImage $tile_image)
 
preload(array $object_ids)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
retrieveDataForObjectId(int $object_id)
 
getFor(?int $object_id, string $type=null)
 
withPropertyTileImage(ilObjectPropertyTileImage $property_tile_image)
 
getDefaultCoreProperties(?string $type)
 
store(ilObjectCoreProperties $properties)
 
__construct(private readonly ilDBInterface $database, private readonly ilObjectDefinition $obj_definition, private readonly ResourceStorageService $storage_services, private readonly ilObjectTileImageStakeholder $storage_stakeholder, private readonly ilObjectTileImageFlavourDefinition $flavour_definition, private readonly ObjectTypeSpecificPropertiesFactory $object_type_specific_properties_factory)