Properties

$translators

$translators : array

Type

array — translators

$current_user_model

$current_user_model : \App\Site\Models\User

Type

User — current user model

$action_buttons

$action_buttons : array

Type

array — action_buttons

$request

$request : \Symfony\Component\HttpFoundation\Request

Type

\Symfony\Component\HttpFoundation\Request — request object

$response

$response : \Symfony\Component\HttpFoundation\Response

Type

\Symfony\Component\HttpFoundation\Response — response object

$route_info

$route_info : \App\Site\Routing\RouteInfo

Type

RouteInfo — route info object

$container

$container : \Psr\Container\ContainerInterface

Type

\Psr\Container\ContainerInterface — container

$form

$form : \Degami\PHPFormsApi\Form

Type

\Degami\PHPFormsApi\Form — form object

$contact

$contact : \App\Site\Models\Contact

Type

Contact — contact object

Methods

getRouteGroup()

getRouteGroup() : string

gets route group

Returns

string —

checkPermission()

checkPermission(string  $permission_name) : bool

checks if current user has permission

Parameters

string $permission_name

Throws

\Degami\Basics\Exceptions\BasicException

Returns

bool —

addActionLink()

addActionLink( $key,  $link_id,  $link_text, string  $link_href = '#', string  $link_class = 'btn btn-sm btn-light', array  $attributes = []) : self

adds an action link

Parameters

$key
$link_id
$link_text
string $link_href
string $link_class
array $attributes

Returns

self —

__construct()

__construct(\Psr\Container\ContainerInterface  $container) : mixed

constructor

Parameters

\Psr\Container\ContainerInterface $container

Returns

mixed —

process()

process(\App\Site\Routing\RouteInfo|null  $route_info = null, array  $route_data = []) : \Symfony\Component\HttpFoundation\Response

{@inheritdocs}

Parameters

\App\Site\Routing\RouteInfo|null $route_info
array $route_data

Throws

\Degami\Basics\Exceptions\BasicException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

\Symfony\Component\HttpFoundation\Response —

renderPage()

renderPage(\App\Site\Routing\RouteInfo|null  $route_info = null, array  $route_data = []) : \Symfony\Component\HttpFoundation\Response|self

controller entrypoint

Parameters

\App\Site\Routing\RouteInfo|null $route_info
array $route_data

Throws

\App\Base\Exceptions\PermissionDeniedException

Returns

\Symfony\Component\HttpFoundation\Response|self —

getRequest()

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

gets current request object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Symfony\Component\HttpFoundation\Request —

getRouteInfo()

getRouteInfo() : \App\Site\Routing\RouteInfo

get route_info array

Returns

\App\Site\Routing\RouteInfo —

__toString()

__toString() : string

toString magic method

Returns

string —

the form html

getUrl()

getUrl(string  $route_name, array  $route_params = []) : string

gets url by route_name and params

Parameters

string $route_name
array $route_params

Throws

\Degami\Basics\Exceptions\BasicException

Returns

string —

getRouteName()

getRouteName() : string

gets current route name

Returns

string —

getControllerUrl()

getControllerUrl() : string

gets current controller url

Throws

\Degami\Basics\Exceptions\BasicException

Returns

string —

getDestParam()

getDestParam(null  $destination_url = null) : string

gets the destination param

Parameters

null $destination_url

Throws

\Degami\Basics\Exceptions\BasicException

Returns

string —

canBeFPC()

canBeFPC() : bool

specifies if this controller is eligible for full page cache

Returns

bool —

getTranslator()

getTranslator(string|null  $locale_code = null) : \Fisharebest\Localization\Translator

gets translator

Parameters

string|null $locale_code

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

\Fisharebest\Localization\Translator —

__call()

__call(string  $name, mixed  $arguments) : mixed

{@inheritdocs}

Parameters

string $name
mixed $arguments

Throws

\App\Base\Exceptions\InvalidValueException

Returns

mixed —

getContainer()

getContainer() : \Psr\Container\ContainerInterface

gets container object

Returns

\Psr\Container\ContainerInterface —

getApp()

getApp() : \App\App

gets app object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\App —

getLog()

getLog() : \Monolog\Logger

gets log object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Monolog\Logger —

getTemplates()

getTemplates() : \League\Plates\Engine

gets plates engine object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\League\Plates\Engine —

getDebugbar()

getDebugbar() : \DebugBar\StandardDebugBar

gets debugbar object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\DebugBar\StandardDebugBar —

getDb()

getDb() : \LessQL\Database

gets db object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\LessQL\Database —

getPdo()

getPdo() : \PDO

gets PDO object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\PDO —

getSchema()

getSchema() : \Degami\SqlSchema\Schema

gets schema object

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Degami\SqlSchema\Schema —

getEventManager()

getEventManager() : \Gplanchat\EventManager\SharedEventEmitter

gets events manager service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Gplanchat\EventManager\SharedEventEmitter —

getWebRouter()

getWebRouter() : \App\Site\Routing\Web

gets routing service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Site\Routing\Web —

getCrudRouter()

getCrudRouter() : \App\Site\Routing\Crud

gets crud service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Site\Routing\Crud —

getRouters()

getRouters() : array

gets routers

Throws

\Degami\Basics\Exceptions\BasicException

Returns

array —

getUtils()

getUtils() : \App\Base\Tools\Utils\Globals

gets global utils service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Utils\Globals —

getSiteData()

getSiteData() : \App\Base\Tools\Utils\SiteData

gets site data service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Utils\SiteData —

getAssets()

getAssets() : \App\Base\Tools\Assets\Manager

gets assets manager

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Assets\Manager —

getGuzzle()

getGuzzle() : \GuzzleHttp\Client

gets guzzle service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\GuzzleHttp\Client —

getImagine()

getImagine() : \Imagine\Gd\Imagine

gets imagine service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Imagine\Gd\Imagine —

getMailer()

getMailer() : \App\Base\Tools\Utils\Mailer

gets mailer service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Utils\Mailer —

getSesMailer()

getSesMailer() : \Aws\Ses\SesClient

gets SES mailer service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Aws\Ses\SesClient —

getSmtpMailer()

getSmtpMailer() : \Swift_Mailer

gets SMTP mailer service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Swift_Mailer —

getCache()

getCache() : \App\Base\Tools\Cache\Manager

get cache manager

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Cache\Manager —

getHtmlRenderer()

getHtmlRenderer() : \App\Base\Tools\Utils\HtmlPartsRenderer

gets html renderer service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\App\Base\Tools\Utils\HtmlPartsRenderer —

getIcons()

getIcons() : \Feather\Icons

gets icons service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\Feather\Icons —

getElasticsearch()

getElasticsearch() : \ElasticSearch\Client

gets elasticsearch service

Throws

\Degami\Basics\Exceptions\BasicException

Returns

\ElasticSearch\Client —

getEnv()

getEnv(string  $variable, mixed  $default = null) : mixed

gets env variable

Parameters

string $variable
mixed $default

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed —

getAppRouteInfo()

getAppRouteInfo() : \App\Site\Routing\RouteInfo|null

gets route info

Returns

\App\Site\Routing\RouteInfo|null —

getAppWebsite()

getAppWebsite() : \App\Site\Models\Website|null

gets current website

Returns

\App\Site\Models\Website|null —

requestUrl()

requestUrl(string  $url, string  $method = 'GET', array  $options = []) : string|bool

executes an http request

Parameters

string $url
string $method
array $options

Throws

\Exception
\GuzzleHttp\Exception\GuzzleException

Returns

string|bool —

emptyForm()

emptyForm(\Degami\PHPFormsApi\Form  $form, array  $form_state) : \Degami\PHPFormsApi\Form

returns an empty form

Parameters

\Degami\PHPFormsApi\Form $form
array $form_state

Returns

\Degami\PHPFormsApi\Form —

sitemapFormsCallback()

sitemapFormsCallback(\Degami\PHPFormsApi\Form  $form) : \Degami\PHPFormsApi\Abstracts\Base\Element|null

ajax callback

Parameters

\Degami\PHPFormsApi\Form $form

Returns

\Degami\PHPFormsApi\Abstracts\Base\Element|null —

beforeRender()

beforeRender() : \Symfony\Component\HttpFoundation\Response|self

before render hook

Throws

\App\Base\Exceptions\PermissionDeniedException

Returns

\Symfony\Component\HttpFoundation\Response|self —

getAccessPermission()

getAccessPermission() : string

{@inheritdocs}

Returns

string —

checkCredentials()

checkCredentials() : bool

checks user credentials

Throws

\Degami\Basics\Exceptions\BasicException

Returns

bool —

renderActionButtons()

renderActionButtons() : string

renders action buttons

Throws

\DI\DependencyException
\DI\NotFoundException

Returns

string —

addActionButton()

addActionButton(string  $key, string  $button_id, string  $button_text, string  $button_class = 'btn btn-sm btn-light') : self

adds an action button

Parameters

string $key
string $button_id
string $button_text
string $button_class

Returns

self —

getJsonData()

getJsonData() : array

{@inheritdocs}

Returns

array —

getRouteData()

getRouteData(null  $var_name = null) : mixed|null

gets route data

Parameters

null $var_name

Returns

mixed|null —

getResponse()

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

get response object

Returns

\Symfony\Component\HttpFoundation\Response —

doRedirect()

doRedirect( $url, array  $additional_headers = []) : \Symfony\Component\HttpFoundation\RedirectResponse

returns a redirect object

Parameters

$url
array $additional_headers

Returns

\Symfony\Component\HttpFoundation\RedirectResponse —

getService()

getService(string  $service_key) : mixed

gets registered service

Parameters

string $service_key

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed —