ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\Repository\NullRepository Class Reference
+ Inheritance diagram for ILIAS\MetaData\Repository\NullRepository:
+ Collaboration diagram for ILIAS\MetaData\Repository\NullRepository:

Public Member Functions

 getMD (int $obj_id, int $sub_id, string $type)
 
 getMDOnPath (PathInterface $path, int $obj_id, int $sub_id, string $type)
 Returns an MD set with only the elements specified on a path, and all nested subelements of the last elements on the path. More...
 
 searchMD (ClauseInterface $clause, ?int $limit, ?int $offset, FilterInterface ... $filters)
 
 manipulateMD (SetInterface $set)
 Follows a trail of markers from the root element, and creates, updates or deletes marked MD elements along the trail. More...
 
 transferMD (SetInterface $from_set, int $to_obj_id, int $to_sub_id, string $to_type, bool $throw_error_if_invalid)
 Transfers a metadata set to an object, regardless of its source. More...
 
 deleteAllMD (int $obj_id, int $sub_id, string $type)
 

Detailed Description

Definition at line 30 of file NullRepository.php.

Member Function Documentation

◆ deleteAllMD()

ILIAS\MetaData\Repository\NullRepository::deleteAllMD ( int  $obj_id,
int  $sub_id,
string  $type 
)

Implements ILIAS\MetaData\Repository\RepositoryInterface.

Definition at line 67 of file NullRepository.php.

67  : void
68  {
69  }

◆ getMD()

ILIAS\MetaData\Repository\NullRepository::getMD ( int  $obj_id,
int  $sub_id,
string  $type 
)
  • obj_id: Object ID (NOT ref_id!) of the parent repository object (e.g for page objects the obj_id of the content object; for media objects this is set to 0, because their object id are not assigned to ref ids). NOTE: In the metadata tables, this corresponds to the field rbac_id.
  • sub_id: ID of the object carrying the metadata, which might be a subobject of an enclosing repository object (e.g for structure objects the obj_id of the structure object). Might be the same as the objID. NOTE: In the metadata tables, this corresponds to the field obj_id.
  • type: (Sub-)Type of the object (e.g st,pg,crs ...). NOTE: In the metadata tables, this corresponds to the field obj_type.

Implements ILIAS\MetaData\Repository\RepositoryInterface.

Definition at line 32 of file NullRepository.php.

32  : SetInterface
33  {
34  return new NullSet();
35  }

◆ getMDOnPath()

ILIAS\MetaData\Repository\NullRepository::getMDOnPath ( PathInterface  $path,
int  $obj_id,
int  $sub_id,
string  $type 
)

Returns an MD set with only the elements specified on a path, and all nested subelements of the last elements on the path.

The path must start from the root element. Note that path filters are ignored, and if the path contains steps to super elements, it is only followed down to the first element that the path returns to. Note that resulting partial MD sets might not be completely valid, due to conditions between elements. Be careful when dealing with vocabularies, or Technical > Requirement > OrComposite.

Implements ILIAS\MetaData\Repository\RepositoryInterface.

Definition at line 37 of file NullRepository.php.

37  : SetInterface
38  {
39  return new NullSet();
40  }

◆ manipulateMD()

ILIAS\MetaData\Repository\NullRepository::manipulateMD ( SetInterface  $set)

Follows a trail of markers from the root element, and creates, updates or deletes marked MD elements along the trail.

Non-scaffold elements with 'create or update' markers are updated, and scaffold elements with 'create or update' markers are created with the data value on the marker. Stops when encountering a neutral marker on a scaffold.

Implements ILIAS\MetaData\Repository\RepositoryInterface.

Definition at line 54 of file NullRepository.php.

54  : void
55  {
56  }

◆ searchMD()

ILIAS\MetaData\Repository\NullRepository::searchMD ( ClauseInterface  $clause,
?int  $limit,
?int  $offset,
FilterInterface ...  $filters 
)
Returns
RessourceIDInterface[]

Implements ILIAS\MetaData\Repository\RepositoryInterface.

Definition at line 45 of file NullRepository.php.

References ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from().

50  : \Generator {
51  yield from [];
52  }
+ Here is the call graph for this function:

◆ transferMD()

ILIAS\MetaData\Repository\NullRepository::transferMD ( SetInterface  $from_set,
int  $to_obj_id,
int  $to_sub_id,
string  $to_type,
bool  $throw_error_if_invalid 
)

Transfers a metadata set to an object, regardless of its source.

Takes The data from 'create or update' markers takes priority over the data carried by marked elements, but 'delete' markers and unmarked or neutrally marked scaffolds are ignored. Always deletes whatever metadata already exist at the target.

If $throw_error_if_invalid is set true, an error is thrown if the markers on the $from_set are invalid, otherwise the invalid markers are replaced by neutral markers.

Implements ILIAS\MetaData\Repository\RepositoryInterface.

Definition at line 58 of file NullRepository.php.

64  : void {
65  }

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