Skip to content

Instantly share code, notes, and snippets.

@webmozart
Created October 15, 2015 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webmozart/d8325047fb8bf0a35704 to your computer and use it in GitHub Desktop.
Save webmozart/d8325047fb8bf0a35704 to your computer and use it in GitHub Desktop.
<?php
namespace ACC\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
class DefaultController extends Controller
{
/**
* @Route("/", name="accmain_index")
* @Template()
*/
public function indexAction()
{
$measurement = $this->get('akeneo_measure.manager')->makeMeasurement(15.42, 'cm');
$form = $this->createForm('acrdMeas_measurement', $measurement, array('unitFamily' => 'Area'));
return array('form' => $form->createView(), 'measure'=>$measurement);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment