ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilFileDataForum Class Reference
+ Inheritance diagram for ilFileDataForum:
+ Collaboration diagram for ilFileDataForum:

Public Member Functions

 __construct (private readonly int $obj_id=0, private readonly int $pos_id=0)
 
 getObjId ()
 
 getPosId ()
 
 setPosId (int $posting_id)
 
 getForumPath ()
 
 getFilesOfPost ()
 
 moveFilesOfPost (int $new_frm_id=0)
 
 ilClone (int $new_obj_id, int $new_posting_id)
 
 delete (array $posting_ids_to_delete=null)
 
 storeUploadedFiles ()
 
 unlinkFile (string $filename)
 
 getFileDataByMD5Filename (string $hashed_filename)
 
 unlinkFilesByMD5Filenames ($hashed_filename_or_filenames)
 
 deliverFile (string $file)
 
 deliverZipFile ()
 
 importPath (string $path_to_file, int $posting_id)
 

Private Member Functions

 getCurrentPosting ()
 
 getImplementation ()
 

Private Attributes

array $posting_cache = []
 
ilFileDataForumLegacyImplementation $legacy_implementation
 
ilFileDataForumRCImplementation $rc_implementation
 

Detailed Description

Definition at line 21 of file class.ilFileDataForum.php.

Constructor & Destructor Documentation

◆ __construct()

ilFileDataForum::__construct ( private readonly int  $obj_id = 0,
private readonly int  $pos_id = 0 
)

Definition at line 28 of file class.ilFileDataForum.php.

31  {
32  $this->legacy_implementation = new ilFileDataForumLegacyImplementation(
33  $this->obj_id,
34  $this->pos_id
35  );
36  $this->rc_implementation = new ilFileDataForumRCImplementation(
37  $this->obj_id,
38  $this->pos_id
39  );
40  }

Member Function Documentation

◆ delete()

ilFileDataForum::delete ( array  $posting_ids_to_delete = null)
Parameters
list<int>|null$posting_ids_to_delete

Implements ilFileDataForumInterface.

Definition at line 99 of file class.ilFileDataForum.php.

References getImplementation().

99  : bool
100  {
101  return $this->getImplementation()->delete($posting_ids_to_delete);
102  }
+ Here is the call graph for this function:

◆ deliverFile()

ilFileDataForum::deliverFile ( string  $file)

Implements ilFileDataForumInterface.

Definition at line 131 of file class.ilFileDataForum.php.

References getImplementation().

131  : void
132  {
133  $this->getImplementation()->deliverFile($file);
134  }
+ Here is the call graph for this function:

◆ deliverZipFile()

ilFileDataForum::deliverZipFile ( )

Implements ilFileDataForumInterface.

Definition at line 136 of file class.ilFileDataForum.php.

References getImplementation().

136  : bool
137  {
138  return $this->getImplementation()->deliverZipFile();
139  }
+ Here is the call graph for this function:

◆ getCurrentPosting()

ilFileDataForum::getCurrentPosting ( )
private

Definition at line 42 of file class.ilFileDataForum.php.

Referenced by getImplementation(), and importPath().

42  : ilForumPost
43  {
44  if (isset($this->posting_cache[$this->pos_id])) {
45  return $this->posting_cache[$this->pos_id];
46  }
47 
48  return $this->posting_cache[$this->pos_id] = new ilForumPost($this->pos_id);
49  }
+ Here is the caller graph for this function:

◆ getFileDataByMD5Filename()

ilFileDataForum::getFileDataByMD5Filename ( string  $hashed_filename)
Returns
array{path: string, filename: string, clean_filename: string}|null

Implements ilFileDataForumInterface.

Definition at line 117 of file class.ilFileDataForum.php.

References getImplementation().

117  : ?array
118  {
119  return $this->getImplementation()->getFileDataByMD5Filename($hashed_filename);
120  }
+ Here is the call graph for this function:

◆ getFilesOfPost()

ilFileDataForum::getFilesOfPost ( )
Returns
array<string, array{path: string, md5: string, name: string, size: int, ctime: string}>

Implements ilFileDataForumInterface.

Definition at line 84 of file class.ilFileDataForum.php.

References getImplementation().

Referenced by ilForumNotificationDataProvider\readAttachments(), and ilObjForumGUI\renderPostContent().

84  : array
85  {
86  return $this->getImplementation()->getFilesOfPost();
87  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getForumPath()

ilFileDataForum::getForumPath ( )

Implements ilFileDataForumInterface.

Definition at line 76 of file class.ilFileDataForum.php.

References getImplementation().

76  : string
77  {
78  return $this->getImplementation()->getForumPath();
79  }
+ Here is the call graph for this function:

◆ getImplementation()

ilFileDataForum::getImplementation ( )
private

Definition at line 51 of file class.ilFileDataForum.php.

References $legacy_implementation, $rc_implementation, getCurrentPosting(), and ilForumPost\NO_RCID.

Referenced by delete(), deliverFile(), deliverZipFile(), getFileDataByMD5Filename(), getFilesOfPost(), getForumPath(), getObjId(), getPosId(), ilClone(), moveFilesOfPost(), setPosId(), unlinkFile(), and unlinkFilesByMD5Filenames().

52  {
53  $posting = $this->getCurrentPosting();
54  if ($posting->getRCID() !== ilForumPost::NO_RCID) {
56  }
57 
59  }
ilFileDataForumRCImplementation $rc_implementation
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilFileDataForumLegacyImplementation $legacy_implementation
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObjId()

ilFileDataForum::getObjId ( )

Implements ilFileDataForumInterface.

Definition at line 61 of file class.ilFileDataForum.php.

References getImplementation().

61  : int
62  {
63  return $this->getImplementation()->getObjId();
64  }
+ Here is the call graph for this function:

◆ getPosId()

ilFileDataForum::getPosId ( )

Implements ilFileDataForumInterface.

Definition at line 66 of file class.ilFileDataForum.php.

References getImplementation().

66  : int
67  {
68  return $this->getImplementation()->getPosId();
69  }
+ Here is the call graph for this function:

◆ ilClone()

ilFileDataForum::ilClone ( int  $new_obj_id,
int  $new_posting_id 
)

Implements ilFileDataForumInterface.

Definition at line 94 of file class.ilFileDataForum.php.

References getImplementation().

Referenced by ilObjForum\update().

94  : bool
95  {
96  return $this->getImplementation()->ilClone($new_obj_id, $new_posting_id);
97  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importPath()

ilFileDataForum::importPath ( string  $path_to_file,
int  $posting_id 
)

Definition at line 141 of file class.ilFileDataForum.php.

References getCurrentPosting(), and setPosId().

Referenced by ilForumXMLParser\handlerEndTag().

141  : void
142  {
143  // Importing is only possible for IRSS based files
144  $this->setPosId($posting_id);
145  $this->rc_implementation->importFileToCollection($path_to_file, $this->getCurrentPosting());
146  }
setPosId(int $posting_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveFilesOfPost()

ilFileDataForum::moveFilesOfPost ( int  $new_frm_id = 0)

Implements ilFileDataForumInterface.

Definition at line 89 of file class.ilFileDataForum.php.

References getImplementation().

89  : bool
90  {
91  return $this->getImplementation()->moveFilesOfPost($new_frm_id);
92  }
+ Here is the call graph for this function:

◆ setPosId()

ilFileDataForum::setPosId ( int  $posting_id)

Implements ilFileDataForumInterface.

Definition at line 71 of file class.ilFileDataForum.php.

References getImplementation().

Referenced by importPath().

71  : void
72  {
73  $this->getImplementation()->setPosId($posting_id);
74  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storeUploadedFiles()

ilFileDataForum::storeUploadedFiles ( )

Implements ilFileDataForumInterface.

Definition at line 104 of file class.ilFileDataForum.php.

Referenced by ilObjForumGUI\createThread(), ilObjForumGUI\publishDraftObject(), and ilObjForumGUI\savePostObject().

104  : bool
105  {
106  return $this->rc_implementation->storeUploadedFiles();
107  }
+ Here is the caller graph for this function:

◆ unlinkFile()

ilFileDataForum::unlinkFile ( string  $filename)

Implements ilFileDataForumInterface.

Definition at line 109 of file class.ilFileDataForum.php.

References getImplementation().

109  : bool
110  {
111  return $this->getImplementation()->unlinkFile($filename);
112  }
$filename
Definition: buildRTE.php:78
+ Here is the call graph for this function:

◆ unlinkFilesByMD5Filenames()

ilFileDataForum::unlinkFilesByMD5Filenames (   $hashed_filename_or_filenames)
Parameters
string|string[]$hashed_filename_or_filenames

Implements ilFileDataForumInterface.

Definition at line 125 of file class.ilFileDataForum.php.

References getImplementation().

125  : bool
126  {
127  return $this->getImplementation()->unlinkFilesByMD5Filenames($hashed_filename_or_filenames);
128  }
+ Here is the call graph for this function:

Field Documentation

◆ $legacy_implementation

ilFileDataForumLegacyImplementation ilFileDataForum::$legacy_implementation
private

Definition at line 25 of file class.ilFileDataForum.php.

Referenced by getImplementation().

◆ $posting_cache

array ilFileDataForum::$posting_cache = []
private

Definition at line 24 of file class.ilFileDataForum.php.

◆ $rc_implementation

ilFileDataForumRCImplementation ilFileDataForum::$rc_implementation
private

Definition at line 26 of file class.ilFileDataForum.php.

Referenced by getImplementation().


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