protected function getFormParam($name, $options = array()) { switch ($name) { case 'new': return array('method' => 'POST', 'route' => 'quote_create', 'params' => array(), 'label' => 'Créer', 'type' => new QuoteType(), 'entity' => null); case 'edit': return array('method' => 'POST', 'route' => 'quote_update', 'params' => array('id' => $options['entity']->getId()), 'label' => 'Modifier', 'type' => new QuoteType(), 'entity' => $options['entity']); } return parent::getFormParam($name, $options); }
/** * {@inheritdoc} */ protected function getFormParam($name, $options = array()) { switch ($name) { case 'edit': return array('method' => 'POST', 'route' => 'jlm_product_stock_update', 'params' => array('id' => $options['entity']->getId()), 'label' => 'Modifier', 'type' => new StockType(), 'entity' => $options['entity']); case 'inventory': return array('method' => 'POST', 'route' => 'jlm_product_stock_inventory', 'params' => array(), 'label' => 'Valider', 'type' => new InventoryType(), 'entity' => $options['entity']); } return parent::getFormParam($name, $options); }
/** * {@inheritdoc} */ protected function getFormParam($name, $options = array()) { switch ($name) { case 'new': return array('method' => 'POST', 'route' => 'jlm_contact_corporationcontact_create', 'params' => array(), 'label' => 'Créer', 'type' => new CorporationContactType(), 'entity' => null); case 'edit': return array('method' => 'POST', 'route' => 'jlm_contact_corporationcontact_update', 'params' => array('id' => $options['entity']->getId()), 'label' => 'Modifier', 'type' => new CorporationContactType(), 'entity' => $options['entity']); case 'delete': return array('method' => 'DELETE', 'route' => 'jlm_contact_corporationcontact_delete', 'params' => array('id' => $options['entity']->getId()), 'label' => 'Supprimer', 'type' => 'form', 'entity' => $options['entity']); } return parent::getFormParam($name, $options); }