You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$layout = new PhpEcho('LayoutActus.php');
$layout['body'] = new PhpEcho('block/admin/ActuFormEdit.php', $this['actu']);
C'est la 2e ligne qui me pose problème : le 2e argument que tu passes au constructeur de PhpEcho est $this['actu']. J'en étais resté à la syntaxe de ton exemple rapide dans Github (cool la version française) :
$homepage = new PhpEcho('layout/main.php', [
'header' => new PhpEcho('block/header.php', [
'user' => 'rawsrc',
'navbar' => new PhpEcho('block/navbar.php'),
]),
Ici le 2e argument est un tableau et on voit par exemple que le fichier layout/main.php connaîtra $this['header'] et que block/header.php connaîtra $this['user'] et $this['navbar']. Alors qu'avec ton code, je ne comprend pas ce que va recevoir le bloc block/admin/ActuFormEdit.php. Pourrais-tu m'expliquer STP ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Voici le code que je ne comprend pas :
C'est la 2e ligne qui me pose problème : le 2e argument que tu passes au constructeur de PhpEcho est $this['actu']. J'en étais resté à la syntaxe de ton exemple rapide dans Github (cool la version française) :
$homepage = new PhpEcho('layout/main.php', [
'header' => new PhpEcho('block/header.php', [
'user' => 'rawsrc',
'navbar' => new PhpEcho('block/navbar.php'),
]),
Ici le 2e argument est un tableau et on voit par exemple que le fichier layout/main.php connaîtra $this['header'] et que block/header.php connaîtra $this['user'] et $this['navbar']. Alors qu'avec ton code, je ne comprend pas ce que va recevoir le bloc block/admin/ActuFormEdit.php. Pourrais-tu m'expliquer STP ?
Beta Was this translation helpful? Give feedback.
All reactions