Beispiel #1
0
 /**
  * Generate filename.
  *
  * @param string $dir Directory.
  * @param string $ext File extension.
  * @return string
  */
 protected function generateFilename($dir, $ext)
 {
     if ($dir[0] == '/') {
         $dir = substr($dir, 1);
     }
     if ($dir[strlen($dir) - 1] != '/') {
         $dir .= '/';
     }
     return $this->uploadsPath . $dir . FileRepository::generateFilename($this->uploadsPath . $dir, $ext);
 }
Beispiel #2
0
 /**
  * Get file library.
  */
 protected function fileLibrary()
 {
     $this->request->shiftPath(1);
     $this->fileLibrary = $this->document->componentManager->createComponent('filelibrary', 'Energine\\share\\components\\FileRepository', ['config' => 'core/modules/share/config/FileRepositorySelect.component.xml']);
     $this->fileLibrary->run();
 }