Skip to content

Commit 4d71179

Browse files
Updated a help note
1 parent a574d24 commit 4d71179

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/AppBundle/Entity/Tag.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ public function getName()
5555
*/
5656
public function jsonSerialize()
5757
{
58-
// This method is called when a Tag instance needs be serialized to JSON
59-
// See usage in app/Resources/views/form/fields.html.twig: tags|json_encode
58+
// This entity implements JsonSerializable (http://php.net/manual/en/class.jsonserializable.php)
59+
// so this method is used to customize its JSON representation when json_encode()
60+
// is called, for example in tags|json_encode (app/Resources/views/form/fields.html.twig)
6061

6162
return $this->name;
6263
}

0 commit comments

Comments
 (0)