Added brand storage in product table

This commit is contained in:
Franck Allimant
2014-06-27 20:12:55 +02:00
parent 15f60ad22b
commit f279131fe6
4 changed files with 31 additions and 1 deletions

View File

@@ -164,6 +164,7 @@ class ProductController extends AbstractSeoCrudController
->setPostscriptum($formData['postscriptum'])
->setVisible($formData['visible'])
->setDefaultCategory($formData['default_category'])
->setBrandId($formData['brand_id'])
;
// Create and dispatch the change event
@@ -213,6 +214,10 @@ class ProductController extends AbstractSeoCrudController
$array[$key][] = $value;
}
/**
* @param Product $object
* @return ProductModificationForm
*/
protected function hydrateObjectForm($object)
{
// Find product's sale elements
@@ -320,7 +325,8 @@ class ProductController extends AbstractSeoCrudController
'description' => $object->getDescription(),
'postscriptum' => $object->getPostscriptum(),
'visible' => $object->getVisible(),
'default_category' => $object->getDefaultCategoryId()
'default_category' => $object->getDefaultCategoryId(),
'brand_id' => $object->getBrandId()
);
// Setup the object form