Unverified Commit a79aaf66 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2848367 by mlncn, jp.stacey, kunalkursija: Render API overview example...

Issue #2848367 by mlncn, jp.stacey, kunalkursija: Render API overview example of placeholders either incorrect or misleading

(cherry picked from commit 323a808b)
parent a68f5d6f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -414,13 +414,16 @@
 * render array contained:
 * @code
 * $build['my_element'] = [
 *   '#attached' => ['placeholders' => ['@foo' => 'replacement']],
 *   '#markup' => ['Something about @foo'],
 *   '#markup' => 'Something about @foo',
 *   '#attached' => [
 *     'placeholders' => [
 *       '@foo' => ['#markup' => 'replacement'],
 *     ],
 * ];
 * @endcode
 * then #markup would end up containing 'Something about replacement'.
 *
 * Note that each placeholder value can itself be a render array, which will be
 * Note that each placeholder value *must* itself be a render array. It will be
 * rendered, and any cache tags generated during rendering will be added to the
 * cache tags for the markup.
 *