ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper Class Reference
+ Inheritance diagram for ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper:
+ Collaboration diagram for ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper:

Public Member Functions

 isCopyrightSelectionActive ()
 If copyright selection is not active, there are no copyright presets to choose from, but copyright information can still be added manually to the LOM of objects. More...
 
 hasPresetCopyright (ReaderInterface $reader)
 Is the copyright in the LOM of the reader's object selected from the presets? If not, custom copyright information was entered manually. More...
 
 readPresetCopyright (ReaderInterface $reader)
 If possible, returns the preset copyright selected for the reader's object. More...
 
 readCustomCopyright (ReaderInterface $reader)
 Returns the custom copyright information from the LOM of the reader's object. More...
 
 prepareCreateOrUpdateOfCopyrightFromPreset (ManipulatorInterface $manipulator, string $copyright_id)
 The preset copyright with the given identifier is set to be selected for the manipulator's object. More...
 
 prepareCreateOrUpdateOfCustomCopyright (ManipulatorInterface $manipulator, string $custom_copyright)
 The given copyright information is set to be written to the LOM of the manipulator's object. More...
 
 getAllCopyrightPresets ()
 
 getNonOutdatedCopyrightPresets ()
 
 getCopyrightSearchClause (string $first_copyright_id, string ... $further_copyright_ids)
 Get a search clause that finds object with one of the given copyright entries in their LOM, to be used in {. More...
 

Detailed Description

Definition at line 28 of file NullCopyrightHelper.php.

Member Function Documentation

◆ getAllCopyrightPresets()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::getAllCopyrightPresets ( )
Returns
CopyrightInterface[]

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 67 of file NullCopyrightHelper.php.

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

67  : \Generator
68  {
69  yield from [];
70  }
+ Here is the call graph for this function:

◆ getCopyrightSearchClause()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::getCopyrightSearchClause ( string  $first_copyright_id,
string ...  $further_copyright_ids 
)

Get a search clause that finds object with one of the given copyright entries in their LOM, to be used in {.

See also
::execute()}.

If copyright selection is active, objects without any copyright information are treated as if they had the default copyright.

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 80 of file NullCopyrightHelper.php.

83  : SearchClause {
84  return new NullClause();
85  }

◆ getNonOutdatedCopyrightPresets()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::getNonOutdatedCopyrightPresets ( )
Returns
CopyrightInterface[]

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 75 of file NullCopyrightHelper.php.

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

75  : \Generator
76  {
77  yield from [];
78  }
+ Here is the call graph for this function:

◆ hasPresetCopyright()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::hasPresetCopyright ( ReaderInterface  $reader)

Is the copyright in the LOM of the reader's object selected from the presets? If not, custom copyright information was entered manually.

If no copyright is assigned to the object, it is treated like it has the default copyright licence, and true is returned here.

Always returns false if copyright selection is not active.

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 35 of file NullCopyrightHelper.php.

35  : bool
36  {
37  return false;
38  }

◆ isCopyrightSelectionActive()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::isCopyrightSelectionActive ( )

If copyright selection is not active, there are no copyright presets to choose from, but copyright information can still be added manually to the LOM of objects.

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 30 of file NullCopyrightHelper.php.

30  : bool
31  {
32  return false;
33  }

◆ prepareCreateOrUpdateOfCopyrightFromPreset()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::prepareCreateOrUpdateOfCopyrightFromPreset ( ManipulatorInterface  $manipulator,
string  $copyright_id 
)

The preset copyright with the given identifier is set to be selected for the manipulator's object.

Note that this will also overwrite custom copyright information.

Call {

See also
::execute()} to carry out the changes.

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 50 of file NullCopyrightHelper.php.

53  : ManipulatorInterface {
54  return $manipulator;
55  }

◆ prepareCreateOrUpdateOfCustomCopyright()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::prepareCreateOrUpdateOfCustomCopyright ( ManipulatorInterface  $manipulator,
string  $custom_copyright 
)

The given copyright information is set to be written to the LOM of the manipulator's object.

Note that this will also overwrite any selected preset copyright.

Call {

See also
::execute()} to carry out the changes.

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 57 of file NullCopyrightHelper.php.

60  : ManipulatorInterface {
61  return $manipulator;
62  }

◆ readCustomCopyright()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::readCustomCopyright ( ReaderInterface  $reader)

Returns the custom copyright information from the LOM of the reader's object.

If copyright selection is inactive, or one of the preset copyright options was selected for the object, this returns an empty string.

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 45 of file NullCopyrightHelper.php.

45  : string
46  {
47  return '';
48  }

◆ readPresetCopyright()

ILIAS\MetaData\Services\CopyrightHelper\NullCopyrightHelper::readPresetCopyright ( ReaderInterface  $reader)

If possible, returns the preset copyright selected for the reader's object.

For objects which have no copyright information in their LOM, the default copyright is returned (as long as copyright selection is active).

Returns a null object if copyright selection is not active, or if the object has custom copyright information.

Implements ILIAS\MetaData\Services\CopyrightHelper\CopyrightHelperInterface.

Definition at line 40 of file NullCopyrightHelper.php.

40  : CopyrightInterface
41  {
42  return new NullCopyright();
43  }

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