19 declare(strict_types=1);
35 $this->data_factory = new \ILIAS\Data\Factory();
45 return 'il_skill_profile_exp';
55 # Return an empty label so that the export button is not displayed in the export tab. 60 ilExportHandlerConsumerContextInterface
$context 62 # Do nothing, the export happens in another tab. 66 ilExportHandlerConsumerContextInterface
$context,
67 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
70 $exp_dir = $file->getDownloadInfo();
71 $file_path = $file->getDownloadInfo() . DIRECTORY_SEPARATOR . $file->getFileName();
72 if (is_file($file_path)) {
79 ilExportHandlerConsumerContextInterface
$context,
80 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
84 $file->getDownloadInfo() . DIRECTORY_SEPARATOR . $file->getFileName(),
92 ilExportHandlerConsumerFileIdentifierInterface $file_identifier
98 ilExportHandlerConsumerContextInterface
$context 99 ): ilExportHandlerFileInfoCollectionInterface {
100 $collection_builder = $context->fileCollectionBuilder();
102 $file_names = file_exists($export_dir) ? scandir($export_dir) : [];
103 foreach ($file_names as $file_name) {
104 if (in_array($file_name, [
'.',
'..'])) {
107 $collection_builder = $collection_builder->withSPLFileInfo(
108 new SplFileInfo($export_dir . DIRECTORY_SEPARATOR . $file_name),
109 $this->data_factory->objId($context->exportObject()->getId()),
113 return $collection_builder->collection();
117 ilExportHandlerConsumerContextInterface
$context,
118 ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers
119 ): ilExportHandlerFileInfoCollectionInterface {
120 $collection_builder = $context->fileCollectionBuilder();
121 foreach ($this->
getFiles($context) as $file_info) {
122 if (!in_array($file_info->getFileIdentifier(), $file_identifiers->toStringArray())) {
125 $collection_builder = $collection_builder->withFileInfo($file_info);
127 return $collection_builder->collection();
getFileSelection(ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
onExportOptionSelected(ilExportHandlerConsumerContextInterface $context)
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object
Customizing of pimple-DIC for ILIAS.
onDownloadFiles(ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
onDownloadWithLink(ReferenceId $reference_id, ilExportHandlerConsumerFileIdentifierInterface $file_identifier)
getSupportedRepositoryObjectTypes()
onDeleteFiles(ilExportHandlerConsumerContextInterface $context, ilExportHandlerConsumerFileIdentifierCollectionInterface $file_identifiers)
getFiles(ilExportHandlerConsumerContextInterface $context)
ILIAS Data Factory $data_factory