com\setasign\Konquadrat\Controller\Backend

Admin Class Admin

File: /Konquadrat/src/Controller/Backend/Admin.php

Class hierarchy

  • com\setasign\SetaFramework\Controller\AbstractJsonController

Implements

  • \com\setasign\SetaFramework\Controller\ControllerInterface

Summary

Constants

PERMISSION_ACTION_CLEANUP

public const Admin::PERMISSION_ACTION_CLEANUP = 'cleanup'

PERMISSION_ACTION_HISTORY_READ

public const Admin::PERMISSION_ACTION_HISTORY_READ = 'historyRead'

PERMISSION_ACTION_SHOW_DELETED

public const Admin::PERMISSION_ACTION_SHOW_DELETED = 'showDeleted'

Properties

$data

protected mixed \com\setasign\SetaFramework\Controller\AbstractJsonController::$data

Result data to convert to JSON.

$encodingOptions

protected int \com\setasign\SetaFramework\Controller\AbstractJsonController::$encodingOptions = 79

Default JSON encoding is performed with the following options, which produces RFC4627-compliant JSON, capable of embedding into HTML.

default value of:

JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES

$httpFactory

protected \com\setasign\SetaFramework\Http\HttpFactoryInterface \com\setasign\SetaFramework\Controller\AbstractController::$httpFactory

$messageList

protected Admin::$messageList

$response

protected ?\Psr\Http\Message\ResponseInterface \com\setasign\SetaFramework\Controller\AbstractController::$response

$textContentType

protected bool \com\setasign\SetaFramework\Controller\AbstractJsonController::$textContentType = false

If true the response contentType will be 'text/html; charset=utf-8' instead of 'application/json'.

Needed for the IE. The IE will try to download 'application/json' responses from iframes.


Methods

__construct()

public Admin::__construct (
\com\setasign\Konquadrat\Object\MessageList $messageList,
\com\setasign\SetaFramework\Http\HttpFactoryInterface $httpFactory
)
Parameters
$messageList : \com\setasign\Konquadrat\Object\MessageList
 
$httpFactory : \com\setasign\SetaFramework\Http\HttpFactoryInterface
 

checkReloadIsOngoingAction()

public Admin::checkReloadIsOngoingAction (
\com\setasign\SetaFramework\Registry\PersistantDatabase $persistentDatabase
): void
Parameters
$persistentDatabase : \com\setasign\SetaFramework\Registry\PersistantDatabase
 
Exceptions

Throws \Throwable

cleanupAction()

Deletes all as deleted marked objects with their history.

Additionally, all files in the kon2/data directory which aren't used by an object will be deleted and all objects with not existing files will be cleared.

Parameters
$objectCleaner : \com\setasign\Konquadrat\Cleanup\ObjectCleaner
 
$sessionContext : \com\setasign\Konquadrat\SessionContext
 
Exceptions

Throws \com\setasign\SetaFramework\Permissions\PermissionException

cleanupDbStructureAction()

public Admin::cleanupDbStructureAction (
\com\setasign\SetaFramework\Database\Database $db
): void
Parameters
$db : \com\setasign\SetaFramework\Database\Database
 
Exceptions

Throws \Throwable

cleanupFilesAction()

cleanupOldObjectsAction()

fixConfigReloadFlagAction()

public Admin::fixConfigReloadFlagAction (
\com\setasign\SetaFramework\Application\ApplicationConfig $applicationConfig,
\com\setasign\SetaFramework\Registry\PersistantDatabase $persistentDatabase
): void
Parameters
$applicationConfig : \com\setasign\SetaFramework\Application\ApplicationConfig
 
$persistentDatabase : \com\setasign\SetaFramework\Registry\PersistantDatabase
 
Exceptions

Throws \Throwable

getParam()

public \com\setasign\SetaFramework\Controller\AbstractController::getParam (
string $name,
mixed $default = null
): ?mixed

Returns a param if it exists otherwise this will return $default

Parameters
$name : string
 
$default : mixed
 

getParams()

public \com\setasign\SetaFramework\Controller\AbstractController::getParams (
void
): array

Get all existing params

getResponse()

public \com\setasign\SetaFramework\Controller\AbstractController::getResponse (
void
): \Psr\Http\Message\ResponseInterface

getShowDeletedFlagAction()

installAction()

public Admin::installAction (
\com\setasign\SetaFramework\Database\Database $db,
\com\setasign\Konquadrat\Config\ConfigReloader $configReloader
): void
Parameters
$db : \com\setasign\SetaFramework\Database\Database
 
$configReloader : \com\setasign\Konquadrat\Config\ConfigReloader
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

Throws \Throwable

Throws \com\setasign\Konquadrat\Object\ObjectSaveException

renderView()

protected \com\setasign\SetaFramework\Controller\AbstractJsonController::renderView (
void
): void
Exceptions

Throws \JsonException

repairChildPaths()

protected Admin::repairChildPaths (
\com\setasign\SetaFramework\Database\Database $db,
array $ids,
array $parentPaths
): int
Parameters
$db : \com\setasign\SetaFramework\Database\Database
 
$ids : array
 
$parentPaths : array
 

repairPathsAction()

public Admin::repairPathsAction (
\com\setasign\SetaFramework\Database\Database $db
): void
Parameters
$db : \com\setasign\SetaFramework\Database\Database
 

resetResponse()

public \com\setasign\SetaFramework\Controller\AbstractController::resetResponse (
void
): void

setIdAction()

public Admin::setIdAction (
\com\setasign\SetaFramework\Request\ServerRequest $request,
\com\setasign\SetaFramework\Database\Database $db,
\com\setasign\Konquadrat\Object\ObjectFinder $objectFinder,
\com\setasign\Konquadrat\Object\TransactionManager $transactionManager,
\com\setasign\Konquadrat\Object\ObjectTableManager $objectTableManager
): void
Parameters
$request : \com\setasign\SetaFramework\Request\ServerRequest
 
$db : \com\setasign\SetaFramework\Database\Database
 
$objectFinder : \com\setasign\Konquadrat\Object\ObjectFinder
 
$transactionManager : \com\setasign\Konquadrat\Object\TransactionManager
 
$objectTableManager : \com\setasign\Konquadrat\Object\ObjectTableManager
 
Exceptions

Throws \com\setasign\Konquadrat\Exception

Throws \com\setasign\Konquadrat\Object\UnknownObjectException

Throws \Exception

Throws \Throwable

setParam()

public \com\setasign\SetaFramework\Controller\AbstractController::setParam (
string $name,
mixed $value
): \com\setasign\SetaFramework\Controller\ControllerInterface

Sets a param

Parameters
$name : string
 
$value : mixed
 

setParams()

public \com\setasign\SetaFramework\Controller\AbstractController::setParams (
array $params
): \com\setasign\SetaFramework\Controller\ControllerInterface

Set a array of params

Note: The params will be merged with the existing params!!

Parameters
$params : array
 

setShowDeletedFlagAction()

Parameters
$objectFinder : \com\setasign\Konquadrat\Object\ObjectFinder
 
$sessionContext : \com\setasign\Konquadrat\SessionContext
 
Exceptions

Throws \com\setasign\SetaFramework\Permissions\PermissionException

updateAction()

public Admin::updateAction (
\com\setasign\Konquadrat\Config\ConfigReloader $configReloader,
\com\setasign\SetaFramework\Di\Di $di
): void
Parameters
$configReloader : \com\setasign\Konquadrat\Config\ConfigReloader
 
$di : \com\setasign\SetaFramework\Di\Di
 
Exceptions

Throws \Throwable