Skip to content

Instantly share code, notes, and snippets.

@norberttech
Created February 12, 2014 14:23
Show Gist options
  • Save norberttech/8956414 to your computer and use it in GitHub Desktop.
Save norberttech/8956414 to your computer and use it in GitHub Desktop.
$object = new \Object();
$object->name = 'norbert';
$object->surname = 'orzechowicz';
$object->email = 'norbert@orzechowicz.pl';
$objectPreview($object);
$objectPreview->addField('name', array('propertyPath' => 'name', 'label' => 'User Name'));
$objectPreview->addField('surname', array('propertyPath' => 'surname', 'label' => 'User Surname'));
$objectPreview->addField('email', array('propertyPath' => 'email', 'label' => 'Email'));
$this->render('preview.html.twig', array(
'preview' => $objectPreview
));
<table>
<tr>
<td>User Name</td>
<td>Norbert</td>
<tr>
<tr>
<td>User Surname</td>
<td>Orzechowicz</td>
<tr>
<tr>
<td>Email</td>
<td>norbert@orzechowicz.pl</td>
<tr>
<table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment