PHP Class Contao\FileSelector

Provide methods to handle input field "file tree".
Inheritance: extends Widget
Afficher le fichier Open project: contao/core-bundle

Protected Properties

Свойство Type Description
$arrNodes array Path nodes
$arrValidFileTypes array Valid file types
$blnSubmitInput boolean Submit user input
$strTemplate string Template

Méthodes publiques

Méthode Description
__construct ( array $arrAttributes = null ) Load the database object
generate ( ) : string Generate the widget and return it as string
generateAjax ( integer $strFolder, string $strField, integer $level, boolean $mount = false ) : string Generate a particular subpart of the file tree and return it as HTML string

Méthodes protégées

Méthode Description
convertValuesToPaths ( ) Translate the file IDs to file paths
isProtectedPath ( string $path ) : boolean Check if a path is protected (see #287)
renderFiletree ( string $path, integer $intMargin, boolean $mount = false, boolean $blnProtected = true, array $arrFound = [] ) : string Recursively render the filetree

Method Details

__construct() public méthode

Load the database object
public __construct ( array $arrAttributes = null )
$arrAttributes array

convertValuesToPaths() protected méthode

Translate the file IDs to file paths
protected convertValuesToPaths ( )

generate() public méthode

Generate the widget and return it as string
public generate ( ) : string
Résultat string

generateAjax() public méthode

Generate a particular subpart of the file tree and return it as HTML string
public generateAjax ( integer $strFolder, string $strField, integer $level, boolean $mount = false ) : string
$strFolder integer
$strField string
$level integer
$mount boolean
Résultat string

isProtectedPath() protected méthode

Check if a path is protected (see #287)
protected isProtectedPath ( string $path ) : boolean
$path string
Résultat boolean

renderFiletree() protected méthode

Recursively render the filetree
protected renderFiletree ( string $path, integer $intMargin, boolean $mount = false, boolean $blnProtected = true, array $arrFound = [] ) : string
$path string
$intMargin integer
$mount boolean
$blnProtected boolean
$arrFound array
Résultat string

Property Details

$arrNodes protected_oe property

Path nodes
protected array $arrNodes
Résultat array

$arrValidFileTypes protected_oe property

Valid file types
protected array $arrValidFileTypes
Résultat array

$blnSubmitInput protected_oe property

Submit user input
protected bool $blnSubmitInput
Résultat boolean

$strTemplate protected_oe property

Template
protected string $strTemplate
Résultat string