Return the reduced file name
@param mixed
@param DataContainer
@return string
422290
public function validateMaxUploadFileSize($varValue, DataContainer $dc)
	{
		$arrValue = deserialize($varValue);
		$dmsUnit = $arrValue['unit'];
		$dmsVal = \Document::convertFileSize((double) $arrValue['value'], $dmsUnit, \Document::FILE_SIZE_UNIT_BYTE);
		$phpVal = $this->getPhpUploadMaxFilesize();
		
		if ($dmsVal > $phpVal)
		{
			throw new \Exception(sprintf($GLOBALS['TL_LANG']['ERR']['dmsMaxUploadFileSize'], \Document::formatFileSize(\Document::convertFileSize($phpVal, \Document::FILE_SIZE_UNIT_BYTE, $dmsUnit), $dmsUnit)));
		}
		
		return $varValue;
	}
1140875
public function getStartCategoryPath(\DataContainer $dc)
  {
    $dmsLoader = \DmsLoader::getInstance();
    $params = new \DmsLoaderParams();
    $params->loadRootCategory = true;
    $category = $dmsLoader->loadCategory($dc->activeRecord->dmsStartCategory, $params);
    $path = '';
    if ($category != null)
    {
      $path .= implode($GLOBALS['TL_LANG']['DMS']['management_path_separator'], $category->getPathNames(false));
    }

    return '<div class="w50 widget">
  <h3><label for="ctrl_dmsStartCategory">' . $GLOBALS['TL_LANG']['tl_module']['dmsStartCategoryPath'][0] . '</label></h3>
  <input type="text" class="tl_text" value="' . $path . '" disabled="">
  <p class="tl_help tl_tip">' . $GLOBALS['TL_LANG']['tl_module']['dmsStartCategoryPath'][1] . '</p>
</div>';
  }
1208020
public function readData(DataContainer $data)
    {
        $this->name = $data->getString('n', '');
        $this->labels->readData($data->getObject('l'));
        $this->descriptions->readData($data->getObject('d'));
        $this->craftingCategories = array_map('strval', $data->getArray('c'));
        $this->craftingSpeed = $data->getFloat('s', 1.);
        $this->numberOfItemSlots = $data->getInteger('i', 0);
        $this->numberOfFluidInputSlots = $data->getInteger('f', 0);
        $this->numberOfFluidOutputSlots = $data->getInteger('u', 0);
        $this->numberOfModuleSlots = $data->getInteger('m', 0);
        $this->energyUsage = $data->getFloat('e', 0.);
        $this->energyUsageUnit = $data->getString('r', 'W');
        $this->iconHash = $data->getString('o');
        return $this;
    }
465118
protected function getFullFileName($containerName, $fileName, $relativePath)
    {
        if ($relativePath === null) {
            $relativePath = '';
        } else {
            $relativePath = trim($relativePath, '/');
            $relativePath = $relativePath . '/';
        }

        return sprintf('%s/%s%s', $containerName, $relativePath, $fileName);
    }
663281
public function getFilename() : ?string 
    {
        if ( ! $this->hasFilename()) {
            $this->setFilename($this->getDefaultFilename());
        }
        return $this->filename;
    }
1199836
function getFilename(){
		if($content_disposition = $this->getHeaderValue("Content-Disposition")){
			if(preg_match('/filename="(.*?)"/',$content_disposition,$matches)){
				return $matches[1];
			}
		}
		if(preg_match("/([^\\/?]+)(\\?.*|)$/",$this->_Uri,$matches)){
			return $matches[1];
		}
	}
481596
public function getFileSizeWidget(\DataContainer $dc)
  {
    $doc = $dc->activeRecord;

    return '
<div class="w50 widget">
  <h3><label for="ctrl_purge">'.$GLOBALS['TL_LANG']['tl_dms_documents']['data_file_size'][0].'</label></h3>
  <input type="text" class="tl_text" value="' . $doc->data_file_size . '" disabled="">
  <p class="tl_help tl_tip">'.$GLOBALS['TL_LANG']['tl_dms_documents']['data_file_size'][1].'</p>
</div>';
  }
13481
public function getActiveFileTypeSets(DataContainer $dc)
  {
    $arrFileTypeSets = array();
    
    $objFileTypeSets = $this->Database->prepare("SELECT * FROM tl_dms_file_type_sets WHERE published = 1 ORDER BY name")
                ->execute();
    
    while($objFileTypeSets->next())
    {
      $arrFileTypeSets[$objFileTypeSets->id] = $objFileTypeSets->name . "<span style=\"color:#b3b3b3; padding-left:3px;\">[" . \ContaoDMS\DmsUtils::getCuttedAllowedFileTypes($objFileTypeSets->file_types) .  "]</span>";
    }
    
    return $arrFileTypeSets;
  }
74346
public function deleteFile(\DataContainer $dc)
  {
    $filePath = TL_ROOT . '/' . $this->getFullFilePath($dc->activeRecord->data_file_name, $dc);
    if (file_exists($filePath))
    {
      unlink($filePath);
    }
  }
969171
public function generatePanelName($value, $dataContainer): string
    {
        if (!$value) {
            $value = 'panel_' . $dataContainer->activeRecord->id;
        }

        return $value;
    }
845339
function getDBAFilePath( $checkExtensions = true )
    {
         $fileName = 'kernel/classes/datatypes/' . $this->DataTypeString . '/' . $this->getDBAFileName();
         if ( $checkExtensions === true && !file_exists( $fileName ) )
         {
             $fileName = $this->getDBAExtensionFilePath();
         }
         return $fileName;
    }
115761
public function getFileTypeWidget(\DataContainer $dc)
  {
    $doc = $dc->activeRecord;

    return '
<div class="w50 widget">
  <h3><label for="ctrl_purge">'.$GLOBALS['TL_LANG']['tl_dms_documents']['data_file_type'][0].'</label></h3>
  <input type="text" class="tl_text" value="' . $doc->data_file_type . '" disabled="">
  <p class="tl_help tl_tip">'.$GLOBALS['TL_LANG']['tl_dms_documents']['data_file_type'][1].'</p>
</div>';
  }
1055207
public function getName($default = false)
    {
        if (!($name = $this->getDispositionParameter('filename')) &&
            !($name = $this->getContentTypeParameter('name')) &&
            $default) {
            $name = preg_replace('|\W|', '_', $this->getDescription(false));
        }

        return $name;
    }
293261
protected function getFileName()
    {
        if (!$this->fileName) {
            $this->fileName = preg_replace('/\W/', '.', get_class($this)) . '.json';
        }
        return codecept_data_dir() . $this->fileName;
    }
1138282
public static function _getFilename ($file)
	{
		
		// Remove extension
		
		$base	= basename ($file);
		$arr	= explode ('.', $base);
		array_pop ($arr);
		
		// Reset the filename
		
		$file	= NULL;
		
		// Construct the filename without the extension
		
		foreach ($arr as $part)
		{
			$file	.= $part;
		}
		
		// Return the filename
		
		return $file;
		
	}
1087653
private function filename($what = null) {
        // no files?
        if(!$this->$what['intern'])
            return false;

        $last = 0;
        foreach($this->$what['intern'] as $res)
            if(file_exists($res))
                $last = max($last, filemtime($res));

        return "cache-{$last}-" . md5(serialize($this->$what['intern'])) . ".{$what}";
    }
1015399
public function getDataMember( $dataMember )
    {
        if ( $dataMember === 'related_images' )
        {
            $images  = array();

            $relationObject = $this->ContentObjectAttribute->attribute( 'content' );
            if ( $relationObject instanceof eZContentObject )
            {
                $dataMap = $relationObject->attribute( 'data_map' );
                foreach ( $dataMap as $attribute )
                {
                    /** @var eZContentObjectAttribute $attribute */
                    if ( $attribute->attribute( 'data_type_string' ) !== eZImageType::DATA_TYPE_STRING )
                    {
                        continue;
                    }

                    if ( $attribute->hasContent() )
                    {
                        $imageAliasHandler = $attribute->attribute( 'content' );
                        $imageAlias = $imageAliasHandler->imageAlias( 'opengraph' );
                        if ( $imageAlias['is_valid'] == 1 )
                        {
                            $images[] = eZSys::serverURL() . '/' . $imageAlias['full_path'];
                        }
                    }
                }
            }

            if ( empty( $images ) )
            {
                $images[] = eZSys::serverURL() . eZURLOperator::eZImage( null, 'opengraph_default_image.png', '' );
            }

            return $images;
        }

        return "";
    }