PHP Класс Elcodi\Admin\CoreBundle\Controller\Abstracts\AbstractAdminController

Наследование: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Показать файл Открыть проект Примеры использования класса

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
getManagerForClass ( Mixed $entity ) : Doctrine\Common\Persistence\ObjectManager Get entity manager from an entity

Описание методов

deleteAction() защищенный Метод

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
Результат Symfony\Component\HttpFoundation\RedirectResponse Redirect response

disableAction() защищенный Метод

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
Результат array Result

disableEntity() защищенный Метод

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() защищенный Метод

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
Результат array Result

enableEntity() защищенный Метод

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() защищенный Метод

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

flushCache() защищенный Метод

Flush cache
protected flushCache ( )

getFailResponse() защищенный Метод

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
Результат mixed Response

getOkResponse() защищенный Метод

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
Результат mixed Response

getResponse() защищенный Метод

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
Результат mixed Response

redirectRoute() защищенный Метод

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
Результат Symfony\Component\HttpFoundation\RedirectResponse Response

translate() защищенный Метод

Translate
protected translate ( string $string ) : string
$string string String to be translated
Результат string String translated