class ProductController extends AbstractSeoCrudController

Manages products

Traits

Symfony\Component\DependencyInjection\ContainerAwareTrait

Constants

EMPTY_FORM_NAME

CONTROLLER_TYPE

TEMPLATE_404

Methods

EventDispatcher
getDispatcher()

Return the event dispatcher,

getTranslator()

return the Translator

getMailer()

return an instance of \Swift_Mailer with good Transporter configured.

createForm($name, $type = 'form', array $data = array(), array $options = array())

No description

ContainerInterface
getContainer()

No description

string
getControllerType()

No description

adminLogAppend($resource, $action, $message, $resourceId = null)

Helper to append a message to the admin log.

processTemplateAction( string $template)

This method process the rendering of view called from an admin page

__construct()

No description

defaultAction()

The default action is displaying the list.

createAction()

Create a new object

updateAction()

Load a object for modification, and display the edit template.

processUpdateAction()

Save changes on a modified object, and either go back to the object list, or stay on the edition page.

updatePositionAction()

Update object position (only for objects whichsupport that)

setToggleVisibilityAction()

Online status toggle product

deleteAction()

Delete an object

processUpdateSeoAction()

Update SEO modification, and either go back to the object list, or stay on the edition page.

loadAttributesAjaxTabAction()

Attributes ajax tab loading

loadRelatedAjaxTabAction()

Related information ajax tab loading

getVirtualDocumentListAjaxAction($productId, $pseId)

return a list of document which will be displayed in AJAX

getAvailableRelatedContentAction($productId, $folderId)

No description

addRelatedContentAction()

No description

deleteRelatedContentAction()

No description

getAvailableAccessoriesAction($productId, $categoryId)

No description

addAccessoryAction()

No description

deleteAccessoryAction()

No description

updateAccessoryPositionAction()

Update accessory position

updateContentPositionAction()

Update related content position

mixed|Response
setProductTemplateAction( int $productId)

Change product template for a given product.

RedirectResponse|Response
updateAttributesAndFeaturesAction( int $productId)

Update product attributes and features

addAdditionalCategoryAction()

No description

getAttributeValuesAction($productId, $attributeId)

No description

addAttributeValueToCombinationAction($productId, $attributeAvId, $combination)

No description

addProductSaleElementAction()

A a new combination to a product

deleteProductSaleElementAction()

A a new combination to a product

updateProductSaleElementsAction()

Process the change of product's PSE list.

updateProductDefaultSaleElementAction()

Update default product sale element (not attached to any combination)

buildCombinationsAction()

Build combinations from the combination output builder

priceCalculator()

Invoked through Ajax; this method calculates the taxed price from the untaxed price, and vice versa.

calculatePrice()

Calculate tax or untax price for a non existing product.

JsonResponse
loadConvertedPrices()

Calculate all prices

mixed|Response
productSaleElementsProductImageDocumentAssociation( int $pseId, string $type, int $typeId)

No description

getAssociationResponseData($pseId, $type, $typeId)

No description

checkFileType($type)

No description

getAjaxProductSaleElementsImagesDocuments($id, $type)

No description

mixed|Response
cloneAction()

No description

Details

in BaseController at line 128
EventDispatcher getDispatcher()

Return the event dispatcher,

Return Value

EventDispatcher

in BaseController at line 138
Translator getTranslator()

return the Translator

Return Value

Translator

in BaseController at line 545
MailerFactory getMailer()

return an instance of \Swift_Mailer with good Transporter configured.

Return Value

MailerFactory

in BaseController at line 569
BaseForm createForm($name, $type = 'form', array $data = array(), array $options = array())

Parameters

$name
$type
array $data
array $options

Return Value

BaseForm This method builds a thelia form with its name

in BaseController at line 589
ContainerInterface getContainer()

Return Value

ContainerInterface

in BaseAdminController at line 90
string getControllerType()

Return Value

string

in BaseAdminController at line 52
adminLogAppend($resource, $action, $message, $resourceId = null)

Helper to append a message to the admin log.

Parameters

$resource
$action
$message
$resourceId

in BaseAdminController at line 71
Response processTemplateAction( string $template)

This method process the rendering of view called from an admin page

Parameters

string $template the template name

Return Value

Response the response which contains the rendered view

at line 92
__construct()

in AbstractCrudController at line 290
Response defaultAction()

The default action is displaying the list.

Return Value

Response the response

in AbstractCrudController at line 305
Response createAction()

Create a new object

Return Value

Response the response

in AbstractCrudController at line 392
Response updateAction()

Load a object for modification, and display the edit template.

Return Value

Response the response

in AbstractCrudController at line 417
Response processUpdateAction()

Save changes on a modified object, and either go back to the object list, or stay on the edition page.

Return Value

Response the response

in AbstractCrudController at line 506
updatePositionAction()

Update object position (only for objects whichsupport that)

at line 476
setToggleVisibilityAction()

Online status toggle product

in AbstractCrudController at line 605
Response deleteAction()

Delete an object

Return Value

Response the response

Response processUpdateSeoAction()

Update SEO modification, and either go back to the object list, or stay on the edition page.

Return Value

Response the response

at line 111
loadAttributesAjaxTabAction()

Attributes ajax tab loading

at line 124
loadRelatedAjaxTabAction()

Related information ajax tab loading

at line 552
Response getVirtualDocumentListAjaxAction($productId, $pseId)

return a list of document which will be displayed in AJAX

Parameters

$productId
$pseId

Return Value

Response

at line 585
getAvailableRelatedContentAction($productId, $folderId)

Parameters

$productId
$folderId

at line 610
addRelatedContentAction()

at line 636
deleteRelatedContentAction()

at line 664
getAvailableAccessoriesAction($productId, $categoryId)

Parameters

$productId
$categoryId

at line 689
addAccessoryAction()

at line 715
deleteAccessoryAction()

at line 744
updateAccessoryPositionAction()

Update accessory position

at line 757
updateContentPositionAction()

Update related content position

at line 773
mixed|Response setProductTemplateAction( int $productId)

Change product template for a given product.

Parameters

int $productId

Return Value

mixed|Response

at line 802
RedirectResponse|Response updateAttributesAndFeaturesAction( int $productId)

Update product attributes and features

Parameters

int $productId

Return Value

RedirectResponse|Response

Exceptions

PropelException

at line 881
addAdditionalCategoryAction()

at line 907
deleteAdditionalCategoryAction()

at line 935
getAttributeValuesAction($productId, $attributeId)

Parameters

$productId
$attributeId

at line 960
addAttributeValueToCombinationAction($productId, $attributeAvId, $combination)

Parameters

$productId
$attributeAvId
$combination

at line 1009
addProductSaleElementAction()

A a new combination to a product

at line 1035
deleteProductSaleElementAction()

A a new combination to a product

at line 1180
updateProductSaleElementsAction()

Process the change of product's PSE list.

at line 1190
updateProductDefaultSaleElementAction()

Update default product sale element (not attached to any combination)

at line 1220
buildCombinationsAction()

Build combinations from the combination output builder

at line 1312
priceCalculator()

Invoked through Ajax; this method calculates the taxed price from the untaxed price, and vice versa.

at line 1346
JsonResponse calculatePrice()

Calculate tax or untax price for a non existing product.

For an existing product, use self::priceCaclulator

Return Value

JsonResponse

at line 1381
JsonResponse loadConvertedPrices()

Calculate all prices

Return Value

JsonResponse

at line 1461
mixed|Response productSaleElementsProductImageDocumentAssociation( int $pseId, string $type, int $typeId)

Parameters

int $pseId
string $type
int $typeId

Return Value

mixed|Response

at line 1487
getAssociationResponseData($pseId, $type, $typeId)

Parameters

$pseId
$type
$typeId

at line 1610
checkFileType($type)

Parameters

$type

at line 1626
getAjaxProductSaleElementsImagesDocuments($id, $type)

Parameters

$id
$type

at line 1846
mixed|Response cloneAction()

Return Value

mixed|Response

Exceptions

Exception