PHP Class Contao\FileSelector

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

Protected Properties

Property Type Description
$arrNodes array Path nodes
$arrValidFileTypes array Valid file types
$blnSubmitInput boolean Submit user input
$strTemplate string Template

Public Methods

Method 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

Protected Methods

Method 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 method

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

convertValuesToPaths() protected method

Translate the file IDs to file paths
protected convertValuesToPaths ( )

generate() public method

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

generateAjax() public method

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
return string

isProtectedPath() protected method

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

renderFiletree() protected method

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
return string

Property Details

$arrNodes protected_oe property

Path nodes
protected array $arrNodes
return array

$arrValidFileTypes protected_oe property

Valid file types
protected array $arrValidFileTypes
return array

$blnSubmitInput protected_oe property

Submit user input
protected bool $blnSubmitInput
return boolean

$strTemplate protected_oe property

Template
protected string $strTemplate
return string