PHP Class Elcodi\Admin\CoreBundle\Controller\Abstracts\AbstractAdminController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Afficher le fichier Open project: elcodi/bamboo Class Usage Examples

Méthodes protégées

Méthode Description
deleteAction ( Request $request, Mixed $entity, string $redirectPath = null ) : RedirectResponse Updated edited element action
disableAction ( Request $request, Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity ) : array Disable entity
disableEntity ( Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity ) Disables the given entity
enableAction ( Request $request, Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity ) : array Enable entity
enableEntity ( Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity ) Enables the given entity
flush ( mixed $entity ) Save an entity. To ensure the method is simple, the entity will be persisted always
flushCache ( ) Flush cache
getFailResponse ( Request $request, Exception $exception ) : mixed Return fail response
getOkResponse ( Request $request, string $redirectPath = null ) : mixed Return ok response
getResponse ( Request $request, Closure $closure, string $redirectPath = null ) : mixed Return response
redirectRoute ( string $route, array $params = [] ) : RedirectResponse Return a RedirectResponse given a route name and an array of parameters
translate ( string $string ) : string Translate

Private Methods

Méthode Description
getManagerForClass ( Mixed $entity ) : Doctrine\Common\Persistence\ObjectManager Get entity manager from an entity

Method Details

deleteAction() protected méthode

Updated edited element action
protected deleteAction ( Request $request, Mixed $entity, string $redirectPath = null ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request Request
$entity Mixed Entity to delete
$redirectPath string Redirect path
Résultat Symfony\Component\HttpFoundation\RedirectResponse Redirect response

disableAction() protected méthode

Disable entity
protected 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
Résultat array Result

disableEntity() protected méthode

Disables the given entity
protected disableEntity ( Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity )
$entity Elcodi\Component\Core\Entity\Interfaces\EnabledInterface The entity to disable

enableAction() protected méthode

Enable entity
protected 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
Résultat array Result

enableEntity() protected méthode

Enables the given entity
protected enableEntity ( Elcodi\Component\Core\Entity\Interfaces\EnabledInterface $entity )
$entity Elcodi\Component\Core\Entity\Interfaces\EnabledInterface The entity to disable

flush() protected méthode

Save an entity. To ensure the method is simple, the entity will be persisted always
protected flush ( mixed $entity )
$entity mixed Entity

flushCache() protected méthode

Flush cache
protected flushCache ( )

getFailResponse() protected méthode

This method takes into account the type of the request ( GET or POST )
protected getFailResponse ( Request $request, Exception $exception ) : mixed
$request Symfony\Component\HttpFoundation\Request Request
$exception Exception Exception
Résultat mixed Response

getOkResponse() protected méthode

This method takes into account the type of the request ( GET or POST )
protected getOkResponse ( Request $request, string $redirectPath = null ) : mixed
$request Symfony\Component\HttpFoundation\Request Request
$redirectPath string Redirect path
Résultat mixed Response

getResponse() protected méthode

This method takes into account the type of the request ( GET or POST )
protected getResponse ( Request $request, Closure $closure, string $redirectPath = null ) : mixed
$request Symfony\Component\HttpFoundation\Request Request
$closure Closure Closure
$redirectPath string Redirect path
Résultat mixed Response

redirectRoute() protected méthode

Return a RedirectResponse given a route name and an array of parameters
protected redirectRoute ( string $route, array $params = [] ) : RedirectResponse
$route string Route
$params array Params
Résultat Symfony\Component\HttpFoundation\RedirectResponse Response

translate() protected méthode

Translate
protected translate ( string $string ) : string
$string string String to be translated
Résultat string String translated