PHP 클래스 Contao\StyleSheets

Provide methods to handle style sheets.
상속: extends Backend
파일 보기 프로젝트 열기: contao/core-bundle

공개 메소드들

메소드 설명
__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