PHP Class Elcodi\Admin\NewsletterBundle\Controller\NewsletterSubscriptionController

Inheritance: extends Elcodi\Admin\CoreBundle\Controller\Abstracts\AbstractAdminController
Show file Open project: elcodi/bamboo

Public Methods

Method Description
deleteAction ( Request $request, mixed $entity, string $redirectPath = null ) : RedirectResponse Delete entity
disableAction ( Request $request, Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity ) : array Disable entity
editAction ( integer $id ) : array New element action
enableAction ( Request $request, Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity ) : array Enable entity
listAction ( integer $page, integer $limit, string $orderByField, string $orderByDirection ) : array List elements of certain entity type.
newAction ( ) : array New element action
saveAction ( Elcodi\Component\Newsletter\Entity\Interfaces\NewsletterSubscriptionInterface $entity, Symfony\Component\Form\FormInterface $form, boolean $isValid ) : RedirectResponse Save new element action
updateAction ( Elcodi\Component\Newsletter\Entity\Interfaces\NewsletterSubscriptionInterface $entity, Symfony\Component\Form\FormInterface $form, boolean $isValid ) : RedirectResponse Updated edited element action
viewAction ( integer $id ) : array View element action.

Method Details

deleteAction() public method

Delete entity
public deleteAction ( Request $request, mixed $entity, string $redirectPath = null ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request Request
$entity mixed Entity to delete
$redirectPath string Redirect path
return Symfony\Component\HttpFoundation\RedirectResponse Redirect response

disableAction() public method

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
return array Result

editAction() public method

This action is just a wrapper, so should never get any data, as this is component responsibility
public editAction ( integer $id ) : array
$id integer Entity id
return array Result

enableAction() public method

Enable entity
public enableAction ( 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 enable
return array Result

listAction() public method

This action is just a wrapper, so should never get any data, as this is component responsibility
public listAction ( integer $page, integer $limit, string $orderByField, string $orderByDirection ) : array
$page integer Page
$limit integer Limit of items per page
$orderByField string Field to order by
$orderByDirection string Direction to order by
return array Result

newAction() public method

This action is just a wrapper, so should never get any data, as this is component responsibility
public newAction ( ) : array
return array Result

saveAction() public method

Should be POST
public saveAction ( Elcodi\Component\Newsletter\Entity\Interfaces\NewsletterSubscriptionInterface $entity, Symfony\Component\Form\FormInterface $form, boolean $isValid ) : RedirectResponse
$entity Elcodi\Component\Newsletter\Entity\Interfaces\NewsletterSubscriptionInterface Entity to save
$form Symfony\Component\Form\FormInterface Form view
$isValid boolean Request handle is valid
return Symfony\Component\HttpFoundation\RedirectResponse Redirect response

updateAction() public method

Should be POST
public updateAction ( Elcodi\Component\Newsletter\Entity\Interfaces\NewsletterSubscriptionInterface $entity, Symfony\Component\Form\FormInterface $form, boolean $isValid ) : RedirectResponse
$entity Elcodi\Component\Newsletter\Entity\Interfaces\NewsletterSubscriptionInterface Entity to update
$form Symfony\Component\Form\FormInterface Form view
$isValid boolean Request handle is valid
return Symfony\Component\HttpFoundation\RedirectResponse Redirect response

viewAction() public method

This action is just a wrapper, so should never get any data, as this is component responsibility
public viewAction ( integer $id ) : array
$id integer Entity id
return array Result