PHP 클래스 Elcodi\Admin\ProductBundle\Controller\VariantController

상속: extends Elcodi\Admin\CoreBundle\Controller\Abstracts\AbstractAdminController
파일 보기 프로젝트 열기: elcodi/bamboo

공개 메소드들

메소드 설명
deleteAction ( Request $request, mixed $variant, string $redirectPath = null ) : RedirectResponse Delete element action
disableAction ( Request $request, Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity ) : array Disable entity
editAction ( Symfony\Component\Form\FormInterface $form, Elcodi\Component\Product\Entity\Interfaces\ProductInterface $product, Elcodi\Component\Product\Entity\Interfaces\VariantInterface $variant, boolean $isValid ) : RedirectResponse Edit and Saves product
enableAction ( Request $request, Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $variant ) : array Enable entity

보호된 메소드들

메소드 설명
getUniqueAttributesFromVariant ( Elcodi\Component\Product\Entity\Interfaces\VariantInterface $variant ) : array Given a Variant, return a list of the associated Attributes

메소드 상세

deleteAction() 공개 메소드

Delete element action
public deleteAction ( Request $request, mixed $variant, string $redirectPath = null ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request Request
$variant mixed Variant to delete
$redirectPath string Redirect path
리턴 Symfony\Component\HttpFoundation\RedirectResponse Redirect response

disableAction() 공개 메소드

Disable entity
public disableAction ( Request $request, Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity ) : array
$request Symfony\Component\HttpFoundation\Request Request
$entity Elcodi\Component\Core\Entity\Interfaces\EnabledInterface Entity to disable
리턴 array Result

editAction() 공개 메소드

Edit and Saves product
public editAction ( Symfony\Component\Form\FormInterface $form, Elcodi\Component\Product\Entity\Interfaces\ProductInterface $product, Elcodi\Component\Product\Entity\Interfaces\VariantInterface $variant, boolean $isValid ) : RedirectResponse
$form Symfony\Component\Form\FormInterface Form
$product Elcodi\Component\Product\Entity\Interfaces\ProductInterface Product
$variant Elcodi\Component\Product\Entity\Interfaces\VariantInterface Variant
$isValid boolean Is valid
리턴 Symfony\Component\HttpFoundation\RedirectResponse Redirect response

enableAction() 공개 메소드

Enable entity
public enableAction ( Request $request, Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $variant ) : array
$request Symfony\Component\HttpFoundation\Request Request
$variant Elcodi\Component\Core\Entity\Interfaces\EnabledInterface Product variant to enable
리턴 array Result

getUniqueAttributesFromVariant() 보호된 메소드

The Attribute is fetched from the "options" relation. In theory each option in a Variant should belong to a different Attribute.
protected getUniqueAttributesFromVariant ( Elcodi\Component\Product\Entity\Interfaces\VariantInterface $variant ) : array
$variant Elcodi\Component\Product\Entity\Interfaces\VariantInterface
리턴 array