Documentation

LDAPModule extends Module
in package
implements IModule

Class Module

Interfaces, Classes and Traits

IModule
Interface IModule

Table of Contents

NAME  = 'ldap.module'
PERMISSIONS_TABLE  = 'permissions'
TITLE  = 'Login via LDAP server'
VERSION  = '1.0'
COMPANY  = 'kuzbass-cot'
VALID_DOMAIN_REGEX  = "^[\w!@#$%^()\-'{}\.~]{1,255}$"
VALID_HOST_REGEX  = "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$"
VALID_PORT_REGEX  = "/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$"
$assets  : Assets
$container  : Container
$databaseContext  : Context
$hooks  : TemplateHooks
$modelHooks  : ModelHooks
$permissionsManager  : PermissionsManager
$tagManager  : mixed
$translator  : Translator
$user  : mixed
$defaultSettings  : array<string|int, mixed>
$linkGenerator  : LinkGenerator
$systemNotificationsManager  : SystemNotificationsManager
$updatesScripts  : mixed
__construct()  : mixed
__invoke()  : mixed
configurationForm()  : Form
getCompany()  : string
getDependencies()  : array<string|int, mixed>
getInstalledInfo()  : ModuleInstalledInfo
Краткая информация о установленом модуле
getName()  : string
getPath()  : string
getTitle()  : string
getValue()  : mixed|ActiveRow
Возвращает значение найстройки модуля
getValues()  : array<string|int, mixed>
Возвращает все значения настроек модулыя
getVersion()  : string
HasRuleEnableModule()  : bool
Возвращает true если есть разрешение на просмотр модуля
isSystem()  : bool
onConfigurationChange()  : mixed
onDestroy()  : bool
onInitialize()  : bool
onInstall()  : bool
onUninstall()  : bool
onUpdate()  : bool
registerNotification()  : void
registerPermission()  : bool
Зарегистрировать разрешение
unregisterPermission()  : int
Удалить разрешение
updateValue()  : mixed
Обновление настройки
updateValues()  : mixed
Обновление настроек
doUpdateScripts()  : bool
Производит выполнение скриптов обновления, если есть
addServices()  : mixed
addSignInLinksToSignLayout()  : void
getSettings()  : array<string|int, mixed>
registerApiSettingsHook()  : void
registerAuthenticationService()  : void
registerMetaCells()  : void
unregisterMata()  : void

Constants

PERMISSIONS_TABLE

public mixed PERMISSIONS_TABLE = 'permissions'

TITLE

public mixed TITLE = 'Login via LDAP server'

VALID_DOMAIN_REGEX

private mixed VALID_DOMAIN_REGEX = "^[\w!@#$%^()\-'{}\.~]{1,255}$"

VALID_HOST_REGEX

private mixed VALID_HOST_REGEX = "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$"

VALID_PORT_REGEX

private mixed VALID_PORT_REGEX = "/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$"

Properties

$container

public Container $container

$databaseContext

public Context $databaseContext

$tagManager

public mixed $tagManager

$defaultSettings

protected array<string|int, mixed> $defaultSettings = ['server_hostName' => '', 'server_address' => '', 'server_port' => '389', 'use_ldap_from_user' => false, 'use_ldap_from_employee' => false]

$linkGenerator

protected LinkGenerator $linkGenerator

$updatesScripts

private mixed $updatesScripts

Methods

__construct()

public __construct(Container $container) : mixed
Parameters
$container : Container
Return values
mixed

__invoke()

public __invoke() : mixed
Return values
mixed

configurationForm()

public configurationForm() : Form
Return values
Form

getCompany()

public getCompany() : string
Return values
string

getDependencies()

public getDependencies() : array<string|int, mixed>
Return values
array<string|int, mixed>

getInstalledInfo()

Краткая информация о установленом модуле

public getInstalledInfo() : ModuleInstalledInfo

Требуется для определения зависимостей перед установкой

Return values
ModuleInstalledInfo

getName()

public getName() : string
Return values
string

getPath()

public getPath() : string
Return values
string

getTitle()

public getTitle() : string
Return values
string

getValue()

Возвращает значение найстройки модуля

public final getValue(string $key) : mixed|ActiveRow
Parameters
$key : string

Название настройки модуля

Return values
mixed|ActiveRow

getValues()

Возвращает все значения настроек модулыя

public getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

getVersion()

public getVersion() : string
Return values
string

HasRuleEnableModule()

Возвращает true если есть разрешение на просмотр модуля

public HasRuleEnableModule() : bool
Return values
bool

isSystem()

public isSystem() : bool
Return values
bool

onConfigurationChange()

public onConfigurationChange(Form $form, stdClass $values) : mixed
Parameters
$form : Form
$values : stdClass
Return values
mixed

onDestroy()

public onDestroy() : bool
Return values
bool

onInstall()

public onInstall() : bool
Return values
bool

onUninstall()

public onUninstall() : bool
Return values
bool

onUpdate()

public onUpdate(string $pathToScriptsFolder) : bool
Parameters
$pathToScriptsFolder : string
Return values
bool

registerNotification()

public registerNotification(mixed $message[, mixed $status = 'info' ][, mixed $link = null ][, mixed $linkText = '' ]) : void
Parameters
$message : mixed
$status : mixed = 'info'
$link : mixed = null
$linkText : mixed = ''
Return values
void

registerPermission()

Зарегистрировать разрешение

public final registerPermission(string $resource, string $privilege, string $title) : bool
Parameters
$resource : string

Ресурс на который будет распростроняться разрешение

$privilege : string

Действие на которое распространяется разрешение

$title : string

Название разрешения

Tags
deprecated

Удалить в ближайшем рефакторинге

throws
PermissionExists
Return values
bool

unregisterPermission()

Удалить разрешение

public final unregisterPermission([string $resource = '' ][, string $privilege = '' ]) : int
Parameters
$resource : string = ''

Ресурс

$privilege : string = ''

Дейсвие

Tags
deprecated

Удалить в ближайшем рефакторинге

Return values
int

updateValue()

Обновление настройки

public final updateValue( $key,  $value) : mixed
Parameters
$key :
$value :
Return values
mixed

updateValues()

Обновление настроек

public final updateValues(array<string|int, mixed> $values) : mixed
Parameters
$values : array<string|int, mixed>

значение настроек

Return values
mixed

doUpdateScripts()

Производит выполнение скриптов обновления, если есть

protected doUpdateScripts(string $scriptsDir) : bool
Parameters
$scriptsDir : string
Tags
throws
Exception
Return values
bool

addServices()

private addServices() : mixed
Return values
mixed

addSignInLinksToSignLayout()

private addSignInLinksToSignLayout() : void
Return values
void

getSettings()

private getSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

registerApiSettingsHook()

private registerApiSettingsHook() : void
Return values
void

registerAuthenticationService()

private registerAuthenticationService() : void
Return values
void

registerMetaCells()

private registerMetaCells() : void
Return values
void

unregisterMata()

private unregisterMata() : void
Return values
void

Search results