# \Thelia\Controller\AdminCategoryController

The defaut administration controller. Basically, display the login form if user is not yet logged in, or back-office home page if the user is logged in.

## Summary

Methods
Properties
Constants
indexAction()
processAction()
processTemplateAction()
getDispatcher()
redirect()
No public properties found
TEMPLATE_404
createNewCategory()
editCategory()
deleteCategory()
browseCategory()
visibilityToggle()
changePosition()
positionDown()
positionUp()
pageNotFound()
errorPage()
checkAuth()
getParser()
forward()
render()
renderRaw()
nullResponse()
dispatchEvent()
dispatch()
getParserContext()
getSecurityContext()
getRequest()
getSession()
validateForm()
redirectSuccess()
No protected properties found
N/A
No private methods found
No private properties found
N/A

File
  Controller/Admin/CategoryController.php
Package
  \Default
Class hierarchy
  \Symfony\Component\DependencyInjection\ContainerAware
  \Thelia\Controller\BaseController
  \Thelia\Controller\Admin\BaseAdminController
  \Thelia\Controller\Admin\CategoryController

## Tags

None found

## Constants

### TEMPLATE_404

    TEMPLATE_404

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

## Methods

### indexAction()

    indexAction()

#

## Tags

None found

### processAction()

    processAction()

#

## Tags

None found

### processTemplateAction()

    processTemplateAction( $template)

#### Parameters

| $template |

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

### getDispatcher()

    getDispatcher() : \Symfony\Component\EventDispatcher\EventDispatcher

Return the event dispatcher,

#### Returns

\Symfony\Component\EventDispatcher\EventDispatcher

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### redirect()

    redirect(string $url)

redirect request to specify url

#### Parameters

string | $url |

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### createNewCategory()

    createNewCategory( $args)

#### Parameters

| $args |

#

## Tags

None found

### editCategory()

    editCategory( $args)

#### Parameters

| $args |

#

## Tags

None found

### deleteCategory()

    deleteCategory( $args)

#### Parameters

| $args |

#

## Tags

None found

### browseCategory()

    browseCategory( $args)

#### Parameters

| $args |

#

## Tags

None found

### visibilityToggle()

    visibilityToggle( $args)

#### Parameters

| $args |

#

## Tags

None found

### changePosition()

    changePosition( $args)

#### Parameters

| $args |

#

## Tags

None found

### positionDown()

    positionDown( $args)

#### Parameters

| $args |

#

## Tags

None found

### positionUp()

    positionUp( $args)

#### Parameters

| $args |

#

## Tags

None found

### pageNotFound()

    pageNotFound() : \Symfony\Component\HttpFoundation\Response

Return a 404 error

#### Returns

\Symfony\Component\HttpFoundation\Response

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

### errorPage()

    errorPage( $message) : \Symfony\Component\HttpFoundation\Response

Return a general error page

#### Parameters

| $message |

#### Returns

\Symfony\Component\HttpFoundation\Response

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

### checkAuth()

    checkAuth(\Thelia\Controller\Admin\unknown $permissions)

Check current admin user authorisations. An ADMIN role is assumed.

#### Parameters

\Thelia\Controller\Admin\unknown | $permissions | a single permission or an array of permissions.

#### Throws

\Thelia\Core\Security\Exception\AuthenticationException

  if permissions are not granted ti the current user.

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

### getParser()

    getParser() : \Thelia\Controller\Admin\a

#### Returns

\Thelia\Controller\Admin\a —

ParserInterfac instance parser

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

### forward()

    forward(string $controller, array $path, array $query) : \Symfony\Component\HttpFoundation\Response

Forwards the request to another controller.

#### Parameters

string | $controller | The controller name (a string like BlogBundle:Post:index)
array | $path | An array of path parameters
array | $query | An array of query parameters

#### Returns

\Symfony\Component\HttpFoundation\Response —

A Response instance

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

### render()

    render(mixed $templateName, array $args) : \Symfony\Component\HttpFoundation\Response

Render the given template, and returns the result as an Http Response.

#### Parameters

mixed | $templateName | the complete template name, with extension
array | $args | the template arguments

#### Returns

\Symfony\Component\HttpFoundation\Response

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

### renderRaw()

    renderRaw(mixed $templateName, array $args) : \Symfony\Component\HttpFoundation\Response

Render the given template, and returns the result as a string.

#### Parameters

mixed | $templateName | the complete template name, with extension
array | $args | the template arguments

#### Returns

\Symfony\Component\HttpFoundation\Response

#

Inherited from
  \Thelia\Controller\Admin\BaseAdminController

## Tags

None found

### nullResponse()

    nullResponse()

Return an empty response (after an ajax request, for example)

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### dispatchEvent()

    dispatchEvent(string $action) : \Symfony\Component\EventDispatcher\EventDispatcher

Create an action event

#### Parameters

string | $action |

#### Returns

\Symfony\Component\EventDispatcher\EventDispatcher

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### dispatch()

    dispatch(string $eventName, \Thelia\Core\Event\ActionEvent $event)

Dispatch a Thelia event to modules

#### Parameters

string | $eventName | a TheliaEvent name, as defined in TheliaEvents class
\Thelia\Core\Event\ActionEvent | $event | the event

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### getParserContext()

    getParserContext() : \Thelia\Core\Template\ParserContext

Return the parser context,

#### Returns

\Thelia\Core\Template\ParserContext

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### getSecurityContext()

    getSecurityContext( $context) : \Thelia\Core\Security\SecurityContext

Return the security context, by default in admin mode.

#### Parameters

| $context |

#### Returns

\Thelia\Core\Security\SecurityContext

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### getRequest()

    getRequest() : \Symfony\Component\HttpFoundation\Request

#### Returns

\Symfony\Component\HttpFoundation\Request

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### getSession()

    getSession() : \Symfony\Component\HttpFoundation\Session\SessionInterface

Returns the session from the current request

#### Returns

\Symfony\Component\HttpFoundation\Session\SessionInterface

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### validateForm()

    validateForm(\Thelia\Form\BaseForm $aBaseForm, string $expectedMethod) : \Symfony\Component\Form\Form

Validate a BaseForm

#### Parameters

\Thelia\Form\BaseForm | $aBaseForm | the form
string | $expectedMethod | the expected method, POST or GET, or null for any of them

#### Throws

\Thelia\Form\Exception\FormValidationException

  is the form contains error, or the method is not the right one

#### Returns

\Symfony\Component\Form\Form —

Form the symfony form object

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### redirectSuccess()

    redirectSuccess()

If success_url param is present in request, follow this link.

#

Inherited from
  \Thelia\Controller\BaseController

## Tags

None found

### CategoryController.php