PHP Класс Contao\StyleSheets

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

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

Метод Описание
__construct ( ) Import the Files library
checkStyleSheetName ( string $strName ) : string Check the name of an imported file
compileDefinition ( array $row, boolean $blnWriteToFile = false, array $vars = [], array $parent = [], boolean $export = false ) : string Compile format definitions and return them as string
exportStyleSheet ( DataContainer $dc ) Export a style sheet
importStyleSheet ( ) : string Return a form to choose an existing style sheet and import it
updateStyleSheet ( integer $intId ) Update a particular style sheet
updateStyleSheets ( ) Update all style sheets in the scripts folder

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

Метод Описание
compileColor ( mixed $color, boolean $blnWriteToFile = false, array $vars = [] ) : string Compile a color value and return a hex or rgba color
convertHexColor ( string $color, boolean $blnWriteToFile = false, array $vars = [] ) : array Convert hex colors to rgb
createDefinition ( array $arrDefinition ) Create a format definition and insert it into the database
generateBase64Image ( string $strImage, array $arrParent ) : string | boolean Return an image as data: string
shortenHexColor ( string $color ) : string Try to shorten a hex color
writeStyleSheet ( array $row ) Write a style sheet to a file

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

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

Import the Files library
public __construct ( )

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

Check the name of an imported file
public checkStyleSheetName ( string $strName ) : string
$strName string
Результат string

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

Compile a color value and return a hex or rgba color
protected compileColor ( mixed $color, boolean $blnWriteToFile = false, array $vars = [] ) : string
$color mixed
$blnWriteToFile boolean
$vars array
Результат string

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

Compile format definitions and return them as string
public compileDefinition ( array $row, boolean $blnWriteToFile = false, array $vars = [], array $parent = [], boolean $export = false ) : string
$row array
$blnWriteToFile boolean
$vars array
$parent array
$export boolean
Результат string

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

Convert hex colors to rgb
См. также: http://de3.php.net/manual/de/function.hexdec.php#99478
protected convertHexColor ( string $color, boolean $blnWriteToFile = false, array $vars = [] ) : array
$color string
$blnWriteToFile boolean
$vars array
Результат array

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

Create a format definition and insert it into the database
protected createDefinition ( array $arrDefinition )
$arrDefinition array

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

Export a style sheet
public exportStyleSheet ( DataContainer $dc )
$dc DataContainer

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

Return an image as data: string
protected generateBase64Image ( string $strImage, array $arrParent ) : string | boolean
$strImage string
$arrParent array
Результат string | boolean

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

Return a form to choose an existing style sheet and import it
public importStyleSheet ( ) : string
Результат string

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

Try to shorten a hex color
protected shortenHexColor ( string $color ) : string
$color string
Результат string

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

Update a particular style sheet
public updateStyleSheet ( integer $intId )
$intId integer

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

Update all style sheets in the scripts folder
public updateStyleSheets ( )

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

Write a style sheet to a file
protected writeStyleSheet ( array $row )
$row array