Gallery extends Base
Table of Contents
- $entityManager : EntityManager
- $queryBuilder : QueryBuilder
- $request : Request
- $router : Router
- $view : Json
- __construct() : mixed
- create() : Gallery
- Creates new gallery
- delete() : void
- Delete galery by ID
- edit() : Gallery
- Edit gallery by ID
- find() : array<string|int, Gallery>
- Find galleries by key and value
- getAll() : array<string|int, array<string|int, mixed>>
- Gets all galleries
- getOneByAlias() : Gallery
- Gets one gallery by alias
- getOneById() : Gallery
- Gets one gallery by ID
- getState() : array<string|int, string>
- Returns API state
- registerDefaultRoutes() : void
- Register default routes
- registerRoutes() : void
- Register routes to router
- requestDispatch() : void
- Dispatch request to predefined routes
- setRequest() : void
- Sets request
- setView() : void
- Sets view
- checkPerms() : void
- Checks user permitions on route action
Properties
$entityManager
protected
EntityManager
$entityManager
$queryBuilder
protected
QueryBuilder
$queryBuilder
$request
protected
Request
$request
$router
protected
Router
$router
$view
protected
Json
$view
Methods
__construct()
public
__construct(EntityManager $entityManager) : mixed
Parameters
- $entityManager : EntityManager
Return values
mixed —create()
Creates new gallery
public
create() : Gallery
Return values
Gallery —delete()
Delete galery by ID
public
delete(int $id) : void
Parameters
- $id : int
Return values
void —edit()
Edit gallery by ID
public
edit(int $id) : Gallery
Parameters
- $id : int
Return values
Gallery —find()
Find galleries by key and value
public
find(string $key, string $value) : array<string|int, Gallery>
Parameters
- $key : string
- $value : string
Return values
array<string|int, Gallery> —getAll()
Gets all galleries
public
getAll() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>> —getOneByAlias()
Gets one gallery by alias
public
getOneByAlias(string $alias) : Gallery
Parameters
- $alias : string
Return values
Gallery —getOneById()
Gets one gallery by ID
public
getOneById(int $id) : Gallery
Parameters
- $id : int
Return values
Gallery —getState()
Returns API state
public
getState() : array<string|int, string>
Tags
Return values
array<string|int, string> —registerDefaultRoutes()
Register default routes
public
registerDefaultRoutes(Router $router) : void
Parameters
- $router : Router
Return values
void —registerRoutes()
Register routes to router
public
registerRoutes(Router $router) : void
Parameters
- $router : Router
Return values
void —requestDispatch()
Dispatch request to predefined routes
public
requestDispatch(Router $router, Request $request) : void
Parameters
Return values
void —setRequest()
Sets request
public
setRequest(Request $request) : void
Parameters
- $request : Request
Return values
void —setView()
Sets view
public
setView(string $view) : void
Parameters
- $view : string
Return values
void —checkPerms()
Checks user permitions on route action
private
checkPerms(Route $route) : void
Parameters
- $route : Route