getChildren();
foreach($children as $child)
{
if($child->getName() === 'nav'){
$this->nav = $child;
// actuellement le noeud nav ne contient aucune info utile et l'envoyer à NavBuilder est inutile
$nav_builder = new NavBuilder($this->nav);
$nav = $nav_builder->render();
}
elseif($child->getName() === 'breadcrumb'){
$this->breadcrumb = $child;
$breadcrumb_builder = new BreadcrumbBuilder($this->breadcrumb);
$breadcrumb = $breadcrumb_builder->render();
}
}
$viewFile = self::VIEWS_PATH . $node->getName() . '.php';
if(file_exists($viewFile))
{
$node_data = $node->getNodeData();
// titre et description
if(!empty($node_data->getData()))
{
extract($node_data->getData());
}
// réseaux sociaux + logo dans l'entête
// ?-> est l'opérateur de chainage optionnel
$header_logo = Asset::USER_PATH . $node_data->getAssetByRole('header_logo')?->getFileName() ?? '';
$header_background_name = $node_data->getAssetByRole('header_background')?->getFileName();
$header_background = $header_background_name ? Asset::USER_PATH . $header_background_name : '';
$keys = array_keys($social);
$social_networks = '';
foreach($keys as $one_key){
$social_networks .= '
';
}
// boutons mode admin
if($_SESSION['admin']){
// assets dans classe header_additional_inputs
$admin_favicon = '
';
$admin_background = '
';
// asset dans classe header_content
$admin_header_logo = '
';
// texte dans classe header_content
$admin_header_title = '
';
$admin_header_description = '
';
// icônes réseaux sociaux
$social_networks_inputs = '