dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
dbxTPL_design_slots_test.php File Reference

Go to the source code of this file.

Classes

class  dbxObj
 Gemeinsame Basisklasse fuer dbXapp-System-, Modul- und Include-Objekte. More...
class  dbxTPLDesignSlotsTestApi

Functions

 dbx ()

Variables

 $root = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'dbx-tpl-slots-' . bin2hex(random_bytes(5))
 $htm = $root . DIRECTORY_SEPARATOR . 'dbx' . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'demo' . DIRECTORY_SEPARATOR . 'htm'
 $tpl = new dbxTPL()
 $out = $tpl->replace_design_slots('[dbx:logo]|[dbx:branding]|[dbx:footer]', 'demo')
 $expected = '<img src="dbx/design/demo/img/logo.png" data-design="demo">|<strong>Demo</strong>|<footer>blau</footer>'
if($out !==$expected) $missing = $tpl->replace_design_slots('A[dbx:logo]B[dbx:footer]C', 'missing')
 $guarded = $tpl->replace_design_slots('[dbx:branding]', 'demo')

Function Documentation

◆ dbx()

dbx ( )

Definition at line 21 of file dbxTPL_design_slots_test.php.

References $api.

Variable Documentation

◆ $expected

$expected = '<img src="dbx/design/demo/img/logo.png" data-design="demo">|<strong>Demo</strong>|<footer>blau</footer>'

Definition at line 39 of file dbxTPL_design_slots_test.php.

◆ $guarded

$guarded = $tpl->replace_design_slots('[dbx:branding]', 'demo')

Definition at line 50 of file dbxTPL_design_slots_test.php.

◆ $htm

$htm = $root . DIRECTORY_SEPARATOR . 'dbx' . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'demo' . DIRECTORY_SEPARATOR . 'htm'

Definition at line 29 of file dbxTPL_design_slots_test.php.

◆ $missing

if ( $out !==$expected) $missing = $tpl->replace_design_slots('A[dbx:logo]B[dbx:footer]C', 'missing')

◆ $out

◆ $root

$root = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'dbx-tpl-slots-' . bin2hex(random_bytes(5))

Definition at line 27 of file dbxTPL_design_slots_test.php.

◆ $tpl

$tpl = new dbxTPL()

Definition at line 36 of file dbxTPL_design_slots_test.php.