ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 

Private Attributes

array $posting_cache = []
 
readonly 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 27 of file class.ilFileDataForum.php.

30  {
31  $this->rc_implementation = new ilFileDataForumRCImplementation(
32  $this->obj_id,
33  $this->pos_id
34  );
35  }

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 82 of file class.ilFileDataForum.php.

82  : bool
83  {
84  return $this->rc_implementation->delete($posting_ids_to_delete);
85  }

◆ deliverFile()

ilFileDataForum::deliverFile ( string  $file)

Implements ilFileDataForumInterface.

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

113  : void
114  {
115  $this->rc_implementation->deliverFile($file);
116  }

◆ deliverZipFile()

ilFileDataForum::deliverZipFile ( )

Implements ilFileDataForumInterface.

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

118  : bool
119  {
120  return $this->rc_implementation->deliverZipFile();
121  }

◆ getCurrentPosting()

ilFileDataForum::getCurrentPosting ( )
private

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

Referenced by importPath().

37  : ilForumPost
38  {
39  return $this->posting_cache[$this->pos_id] ?? ($this->posting_cache[$this->pos_id] = new ilForumPost(
40  $this->pos_id
41  ));
42  }
+ 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 100 of file class.ilFileDataForum.php.

100  : ?array
101  {
102  return $this->rc_implementation->getFileDataByMD5Filename($hashed_filename);
103  }

◆ getFilesOfPost()

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

Implements ilFileDataForumInterface.

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

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

67  : array
68  {
69  return $this->rc_implementation->getFilesOfPost();
70  }
+ Here is the caller graph for this function:

◆ getForumPath()

ilFileDataForum::getForumPath ( )

Implements ilFileDataForumInterface.

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

59  : string
60  {
61  return $this->rc_implementation->getForumPath();
62  }

◆ getObjId()

ilFileDataForum::getObjId ( )

Implements ilFileDataForumInterface.

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

44  : int
45  {
46  return $this->rc_implementation->getObjId();
47  }

◆ getPosId()

ilFileDataForum::getPosId ( )

Implements ilFileDataForumInterface.

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

49  : int
50  {
51  return $this->rc_implementation->getPosId();
52  }

◆ ilClone()

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

Implements ilFileDataForumInterface.

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

Referenced by ilObjForum\update().

77  : bool
78  {
79  return $this->rc_implementation->ilClone($new_obj_id, $new_posting_id);
80  }
+ Here is the caller graph for this function:

◆ importPath()

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

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

References getCurrentPosting(), and setPosId().

Referenced by ilForumXMLParser\handlerEndTag().

123  : void
124  {
125  // Importing is only possible for IRSS based files
126  $this->setPosId($posting_id);
127  $this->rc_implementation->importFileToCollection($path_to_file, $this->getCurrentPosting());
128  }
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 72 of file class.ilFileDataForum.php.

72  : bool
73  {
74  return $this->rc_implementation->moveFilesOfPost($new_frm_id);
75  }

◆ setPosId()

ilFileDataForum::setPosId ( int  $posting_id)

Implements ilFileDataForumInterface.

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

Referenced by importPath().

54  : void
55  {
56  $this->rc_implementation->setPosId($posting_id);
57  }
+ Here is the caller graph for this function:

◆ storeUploadedFiles()

ilFileDataForum::storeUploadedFiles ( )

Implements ilFileDataForumInterface.

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

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

87  : bool
88  {
89  return $this->rc_implementation->storeUploadedFiles();
90  }
+ Here is the caller graph for this function:

◆ unlinkFile()

ilFileDataForum::unlinkFile ( string  $filename)

Implements ilFileDataForumInterface.

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

92  : bool
93  {
94  return $this->rc_implementation->unlinkFile($filename);
95  }
$filename
Definition: buildRTE.php:78

◆ unlinkFilesByMD5Filenames()

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

Implements ilFileDataForumInterface.

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

108  : bool
109  {
110  return $this->rc_implementation->unlinkFilesByMD5Filenames($hashed_filename_or_filenames);
111  }

Field Documentation

◆ $posting_cache

array ilFileDataForum::$posting_cache = []
private

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

◆ $rc_implementation

readonly ilFileDataForumRCImplementation ilFileDataForum::$rc_implementation
private

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


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