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

Go to the source code of this file.

Variables

 $base = dirname(__DIR__, 4)
 $failures = array()
 $assert
 $cmsJs = (string)file_get_contents($base . '/dbx/js/lib/cms.js')
 $heroTemplates = glob($base . '/dbx/modules/dbxContent/tpl/htm/c-*hero*.htm') ?: array()
foreach($heroTemplates as $templateFile) $sections = (string)file_get_contents($base . '/dbx/modules/dbxContent_admin/include/dbxContent_sections.class.php')
 $reflection = new ReflectionClass(dbxContentRenderer::class)
 $renderer = $reflection->newInstanceWithoutConstructor()
 $detect = $reflection->getMethod('detect_template_slots')
 $parse = $reflection->getMethod('parse_content')
 $slots = $detect->invoke($renderer, '<section class="cms-hero"><div class="hero">{cms:hero}</div></section><main>{cms:col1}</main>')
 $content
 $parsed = $parse->invoke($renderer, $content, $slots)
foreach(array( 'dbxapp', 'dbxdocs', 'steal') as $design) if ( $failures !==array())

Variable Documentation

◆ $assert

$assert
Initial value:
= static function (bool $condition, string $message) use (&$failures): void {
if (!$condition) $failures[] = $message;
}

Definition at line 10 of file dbxContent_cms_hero_contract_test.php.

◆ $base

$base = dirname(__DIR__, 4)

Definition at line 8 of file dbxContent_cms_hero_contract_test.php.

◆ $cmsJs

$cmsJs = (string)file_get_contents($base . '/dbx/js/lib/cms.js')

Definition at line 14 of file dbxContent_cms_hero_contract_test.php.

◆ $content

$content
Initial value:
= '<h2>Freier Hero</h2><figure><video src="hero.mp4"></video></figure>'
. '<hr class="dbx-cms-marker dbx-cms-marker-hero_text" data-dbx-marker="dbx:hero_text">'
. '<p>Seiteninhalt</p>'

Definition at line 53 of file dbxContent_cms_hero_contract_test.php.

◆ $detect

$detect = $reflection->getMethod('detect_template_slots')

Definition at line 44 of file dbxContent_cms_hero_contract_test.php.

◆ $failures

$failures = array()

Definition at line 9 of file dbxContent_cms_hero_contract_test.php.

◆ $heroTemplates

$heroTemplates = glob($base . '/dbx/modules/dbxContent/tpl/htm/c-*hero*.htm') ?: array()

Definition at line 30 of file dbxContent_cms_hero_contract_test.php.

◆ $parse

$parse = $reflection->getMethod('parse_content')

Definition at line 46 of file dbxContent_cms_hero_contract_test.php.

◆ $parsed

$parsed = $parse->invoke($renderer, $content, $slots)

◆ $reflection

$reflection = new ReflectionClass(dbxContentRenderer::class)

Definition at line 42 of file dbxContent_cms_hero_contract_test.php.

◆ $renderer

$renderer = $reflection->newInstanceWithoutConstructor()

Definition at line 43 of file dbxContent_cms_hero_contract_test.php.

◆ $sections

foreach ( $heroTemplates as $templateFile) $sections = (string)file_get_contents($base . '/dbx/modules/dbxContent_admin/include/dbxContent_sections.class.php')

Definition at line 39 of file dbxContent_cms_hero_contract_test.php.

◆ $slots

$slots = $detect->invoke($renderer, '<section class="cms-hero"><div class="hero">{cms:hero}</div></section><main>{cms:col1}</main>')

◆ if

foreach(array('dbxapp', 'dbxdocs', 'steal') as $design) if($failures !==array()) ( $failures ! = = array())

Definition at line 68 of file dbxContent_cms_hero_contract_test.php.