PHP Класс Contao\Theme

Provide methods to handle themes.
Наследование: extends Backend
Показать файл Открыть проект

Открытые методы

Метод Описание
exportTheme ( DataContainer $dc ) Export a theme
importTheme ( ) : string Import a theme

Защищенные методы

Метод Описание
addDataRow ( DOMDocument $xml, DOMElement $table, array $arrRow, array $arrOrder = [] ) Add a data row to the XML document
addFolderToArchive ( ZipWriter $objArchive, string $strFolder, DOMDocument $xml, DOMElement $table, array $arrOrder = [] ) Recursively add a folder to the archive
addTableTlFiles ( DOMDocument $xml, DOMElement $tables, Result $objTheme, ZipWriter $objArchive ) Add the table tl_files to the XML and the files to the archive
addTableTlImageSize ( DOMDocument $xml, DOMNode $tables, Result $objTheme ) Add the table tl_image_size
addTableTlLayout ( DOMDocument $xml, DOMNode $tables, Result $objTheme ) Add the table tl_layout
addTableTlModule ( DOMDocument $xml, DOMNode $tables, Result $objTheme ) Add the table tl_module
addTableTlStyleSheet ( DOMDocument $xml, DOMNode $tables, Result $objTheme ) Add the table tl_style_sheet
addTableTlTheme ( DOMDocument $xml, DOMNode $tables, Result $objTheme ) Add the table tl_theme
addTemplatesToArchive ( ZipWriter $objArchive, string $strFolder ) Add templates to the archive
compareThemeFiles ( array $arrFiles, array $arrDbFields ) : string Compare the theme tables with the local database and check whether there are custom layout sections
customizeUploadPath ( string $strPath ) : string Replace files/ with the custom upload folder name
extractThemeFiles ( array $arrFiles, array $arrDbFields ) Extract the theme files and write the data to the database
standardizeUploadPath ( string $strPath ) : string Replace a custom upload folder name with files/

Описание методов

addDataRow() защищенный Метод

Add a data row to the XML document
protected addDataRow ( DOMDocument $xml, DOMElement $table, array $arrRow, array $arrOrder = [] )
$xml DOMDocument
$table DOMElement
$arrRow array
$arrOrder array

addFolderToArchive() защищенный Метод

Recursively add a folder to the archive
protected addFolderToArchive ( ZipWriter $objArchive, string $strFolder, DOMDocument $xml, DOMElement $table, array $arrOrder = [] )
$objArchive ZipWriter
$strFolder string
$xml DOMDocument
$table DOMElement
$arrOrder array

addTableTlFiles() защищенный Метод

Add the table tl_files to the XML and the files to the archive
protected addTableTlFiles ( DOMDocument $xml, DOMElement $tables, Result $objTheme, ZipWriter $objArchive )
$xml DOMDocument
$tables DOMElement
$objTheme Contao\Database\Result
$objArchive ZipWriter

addTableTlImageSize() защищенный Метод

Add the table tl_image_size
protected addTableTlImageSize ( DOMDocument $xml, DOMNode $tables, Result $objTheme )
$xml DOMDocument
$tables DOMNode
$objTheme Contao\Database\Result

addTableTlLayout() защищенный Метод

Add the table tl_layout
protected addTableTlLayout ( DOMDocument $xml, DOMNode $tables, Result $objTheme )
$xml DOMDocument
$tables DOMNode
$objTheme Contao\Database\Result

addTableTlModule() защищенный Метод

Add the table tl_module
protected addTableTlModule ( DOMDocument $xml, DOMNode $tables, Result $objTheme )
$xml DOMDocument
$tables DOMNode
$objTheme Contao\Database\Result

addTableTlStyleSheet() защищенный Метод

Add the table tl_style_sheet
protected addTableTlStyleSheet ( DOMDocument $xml, DOMNode $tables, Result $objTheme )
$xml DOMDocument
$tables DOMNode
$objTheme Contao\Database\Result

addTableTlTheme() защищенный Метод

Add the table tl_theme
protected addTableTlTheme ( DOMDocument $xml, DOMNode $tables, Result $objTheme )
$xml DOMDocument
$tables DOMNode
$objTheme Contao\Database\Result

addTemplatesToArchive() защищенный Метод

Add templates to the archive
protected addTemplatesToArchive ( ZipWriter $objArchive, string $strFolder )
$objArchive ZipWriter
$strFolder string

compareThemeFiles() защищенный Метод

Compare the theme tables with the local database and check whether there are custom layout sections
protected compareThemeFiles ( array $arrFiles, array $arrDbFields ) : string
$arrFiles array
$arrDbFields array
Результат string

customizeUploadPath() защищенный Метод

Replace files/ with the custom upload folder name
protected customizeUploadPath ( string $strPath ) : string
$strPath string
Результат string

exportTheme() публичный Метод

Export a theme
public exportTheme ( DataContainer $dc )
$dc DataContainer

extractThemeFiles() защищенный Метод

Extract the theme files and write the data to the database
protected extractThemeFiles ( array $arrFiles, array $arrDbFields )
$arrFiles array
$arrDbFields array

importTheme() публичный Метод

Import a theme
public importTheme ( ) : string
Результат string

standardizeUploadPath() защищенный Метод

Replace a custom upload folder name with files/
protected standardizeUploadPath ( string $strPath ) : string
$strPath string
Результат string