update builder block default template
This commit is contained in:
parent
46e01f504f
commit
e8c9520378
|
@ -71,7 +71,7 @@ class MakeBuilderBlock extends AbstractMaker
|
|||
|
||||
if (!$filesystem->exists($templatePath)) {
|
||||
$filesystem->mkdir(dirname($realTemplatePath));
|
||||
$filesystem->dumpFile($realTemplatePath, "{% for item in children %}\n\t{{ item|block_to_html(context) }}\n{% endfor %}\n");
|
||||
$filesystem->dumpFile($realTemplatePath, $this->getTemplate());
|
||||
|
||||
$io->comment(sprintf('<fg=blue>created</>: %s', $realTemplatePath));
|
||||
}
|
||||
|
@ -79,6 +79,18 @@ class MakeBuilderBlock extends AbstractMaker
|
|||
$this->writeSuccessMessage($io);
|
||||
}
|
||||
|
||||
protected function getTemplate(): string
|
||||
{
|
||||
return <<< EOF
|
||||
<div id="{{ id }}">
|
||||
{% for item in children %}
|
||||
{{ item|block_to_html(context) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
EOF;
|
||||
}
|
||||
|
||||
public function configureDependencies(DependencyBuilder $dependencies)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue