\Fuman_Auth_Role_Administrator

Administrator role of fuman.

Summary

Methods
Properties
Constants
init()
getLanguages()
hasLanguages()
hasLanguage()
activate()
getAcl()
hasFlag()
getFlags()
getColumnValues()
setColumnValues()
getColumnNames()
getColumnCount()
getTable()
hasPrimaryColumn()
getPrimaryColumn()
getPrimaryName()
getPrimaryValue()
hasPrimaryValue()
getKey()
getValue()
getValueOrDefault()
hasValue()
isEmpty()
setValue()
isSaved()
isNew()
initByRequest()
save()
setSaved()
validateSave()
hasSaveErrors()
getSaveErrorColumns()
hasColumnSaveError()
getSaveErrorColumnMessages()
addSaveErrorColumnMessage()
addSaveErrorColumnMessages()
delete()
deleted()
getDeletedPrimaryValue()
validateDelete()
addRelationDeleteError()
getRelationDeleteErrors()
hasRelationDeleteErrors()
hasRelationDeleteErrorRecords()
getRelationDeleteErrorRecords()
addRelationDeleteErrorRecord()
__set()
__get()
__isset()
count()
rewind()
current()
key()
next()
valid()
collectSearchContent()
copyTo()
collectText()
implodeCollectedText()
getShowInOverviewText()
getShowInSummaryText()
getSummaryText()
getText()
getUID()
updateUID()
getCache()
invalidateCacheContainer()
hasProperty()
getProperty()
setProperty()
__toString()
sleepRecords()
wakeRecords()
__construct()
No public properties found
FUMAN_FRONTEND_FLAG
FUMAN_INSERT_FILL_VALUES_FLAG
COLLECT_TEXT_ALL
COLLECT_TEXT_FOR_OVERVIEW
COLLECT_TEXT_FOR_SUMMARY
ADMINISTRATOR_ROLE_NAME
_loadAclFromDb()
_loadFlagsFromDb()
_save()
_delete()
$_languages
$_acl
$_activated
$_flags
$_isSaved
$_isNew
$_table
$_columns
$_cache
$_uid
$_primaryColumn
$_tempColumns
$_validateSaveErrors
$_isSaveValidated
$_columnSaveErrors
$_relationDeleteErrors
$_relationDeleteErrorRecords
N/A
No private methods found
$_deletedPrimaryValue
N/A

Constants

FUMAN_FRONTEND_FLAG

FUMAN_FRONTEND_FLAG

FUMAN_INSERT_FILL_VALUES_FLAG

FUMAN_INSERT_FILL_VALUES_FLAG

COLLECT_TEXT_ALL

COLLECT_TEXT_ALL

COLLECT_TEXT_FOR_OVERVIEW

COLLECT_TEXT_FOR_OVERVIEW

COLLECT_TEXT_FOR_SUMMARY

COLLECT_TEXT_FOR_SUMMARY

ADMINISTRATOR_ROLE_NAME

ADMINISTRATOR_ROLE_NAME

Administrator role name

Properties

$_languages

$_languages : array

List of languages.

Type

array

$_acl

$_acl : \Fuman_Acl

The access control list

Type

\Fuman_Acl

$_activated

$_activated : boolean

Type

boolean

$_flags

$_flags : array

Type

array

$_isSaved

$_isSaved : boolean

Type

boolean

$_isNew

$_isNew : boolean

Type

boolean

$_columns

$_columns : array

Holds Values of Columns by columnname

Type

array — columnName => columnValue

$_uid

$_uid : string

Type

string

$_primaryColumn

$_primaryColumn : \Fuman_Column

Primary Column

Type

\Fuman_Column

$_tempColumns

$_tempColumns : \<type>

Type

\

$_validateSaveErrors

$_validateSaveErrors : array

Type

array

$_isSaveValidated

$_isSaveValidated : boolean

Flag which indicates if the record has been validated. Must be false by default!

Type

boolean

$_columnSaveErrors

$_columnSaveErrors : array

Type

array

$_relationDeleteErrors

$_relationDeleteErrors : array

Type

array

$_relationDeleteErrorRecords

$_relationDeleteErrorRecords : array

Records which have an Relation Error, caused by a delete on this records

Type

array

$_deletedPrimaryValue

$_deletedPrimaryValue : null

Type

null

Methods

init()

init(\Fuman_Table  $table) : void

Inits Record

Parameters

\Fuman_Table $table

getLanguages()

getLanguages() : array

Returns all Languages of Fuman_Auth_Role.

Returns

array

hasLanguages()

hasLanguages() : boolean

Returns true if Fuman_Auth_Role has at least one language.

Returns

boolean

hasLanguage()

hasLanguage(string  $language) : boolean

Returns true if Fuman_Auth_Role has the given language.

Parameters

string $language

Returns

boolean

activate()

activate(array|null  $initActions = null, null|boolean  $initFlags = null) : void

Loads all tables for role and appropriate creates appropriate ACL

Parameters

array|null $initActions
null|boolean $initFlags

getAcl()

getAcl() : \Fuman_Acl

Gets ACL

Returns

\Fuman_Acl

hasFlag()

hasFlag(string  $name) : boolean

Has flag

Parameters

string $name

Returns

boolean

getFlags()

getFlags() : array

Gets flags

Returns

array

getColumnValues()

getColumnValues() : array

Gets column values

Returns

array

setColumnValues()

setColumnValues(array  $columnValues) : void

sets column values

Parameters

array $columnValues

getColumnNames()

getColumnNames() : array

Return all column keys

Returns

array

getColumnCount()

getColumnCount() : integer

Counts all columns

Returns

integer

getTable()

getTable() : \Fuman_Table

Gets table

Returns

\Fuman_Table

hasPrimaryColumn()

hasPrimaryColumn() : boolean

Has Table of Record an primary Column?

Returns

boolean

getPrimaryColumn()

getPrimaryColumn() : \Fuman_Column

Gets primary column

Returns

\Fuman_Column

getPrimaryName()

getPrimaryName() : null|string

Get primary column name

Returns

null|string

getPrimaryValue()

getPrimaryValue() : string

Returns value of Primary

Returns

string

hasPrimaryValue()

hasPrimaryValue() : boolean

Has primary value

Returns

boolean

getKey()

getKey() : string

Returns a key of unique-name and record-id

Returns

string

getValue()

getValue(string  $columnName) : mixed

Gets value

Parameters

string $columnName

Returns

mixed

getValueOrDefault()

getValueOrDefault(string  $columnName, string|null  $default = null) : string

Returns a value or default

Parameters

string $columnName
string|null $default

Returns

string

hasValue()

hasValue(string  $columnName) : boolean

Is a value for key set?

Parameters

string $columnName

Returns

boolean

isEmpty()

isEmpty(string  $columnName) : boolean

Is the column empty

Parameters

string $columnName

Returns

boolean

setValue()

setValue(string  $columnName, string  $value) : void

Sets value

Parameters

string $columnName
string $value

isSaved()

isSaved() : boolean

Is Record Saved

Returns

boolean

isNew()

isNew() : boolean

Is the a new record (inserted)

Returns

boolean

initByRequest()

initByRequest(\Fuman_Request  $request) : void

Initializes the record from request

Parameters

\Fuman_Request $request

save()

save(boolean  $validate = true, boolean  $notify = true) : boolean

Saves record (insert/update)

Parameters

boolean $validate
boolean $notify

Returns

boolean

setSaved()

setSaved() : void

Tells the Record that he has been saved

validateSave()

validateSave() : void

Validate record for save

hasSaveErrors()

hasSaveErrors() : boolean

Does the record contain errors

Returns

boolean

getSaveErrorColumns()

getSaveErrorColumns() : array

Gets the save error columns

Returns

array

hasColumnSaveError()

hasColumnSaveError(string  $columnName) : boolean

Does record hold any errors after saving

Parameters

string $columnName

Returns

boolean

getSaveErrorColumnMessages()

getSaveErrorColumnMessages(string  $columnName) : string

Gets the save errors

Parameters

string $columnName

Returns

string

addSaveErrorColumnMessage()

addSaveErrorColumnMessage(string  $columnName, string  $message) : void

Adds save error column message

Parameters

string $columnName
string $message

addSaveErrorColumnMessages()

addSaveErrorColumnMessages(string  $columnName, \array[string]  $messages) : void

Adds multiple save error messages

Parameters

string $columnName
\array[string] $messages

delete()

delete(boolean  $validate = true, \stdClass|null  $visitedRecords = null, string  $logIndent = '') : boolean

Cascade Delete

Parameters

boolean $validate
\stdClass|null $visitedRecords
string $logIndent

Returns

boolean

deleted()

deleted() : void

Call to tell Record that he has been deleted Method resets id value and sets own status to unsaved

getDeletedPrimaryValue()

getDeletedPrimaryValue() : null|integer

Returns the primary value after the record has been deleted (the primary value itself will be removed from record on delete)

Returns

null|integer

validateDelete()

validateDelete(\Fuman_Db_Record  $originRecord, null|\stdClass  $visitedRecords = null, string  $logIndent = '') 

Validate record for delete

Parameters

\Fuman_Db_Record $originRecord

The origin of the delete procedure

null|\stdClass $visitedRecords
string $logIndent

addRelationDeleteError()

addRelationDeleteError(string  $error) : void

Adds relation error on record

Parameters

string $error

getRelationDeleteErrors()

getRelationDeleteErrors() : array

Return relation errors of records

Returns

array

hasRelationDeleteErrors()

hasRelationDeleteErrors() : boolean

Has the record relation errors

Returns

boolean

hasRelationDeleteErrorRecords()

hasRelationDeleteErrorRecords() : boolean

Has the record error records caused by relete

Returns

boolean

getRelationDeleteErrorRecords()

getRelationDeleteErrorRecords() : array<mixed,\Fuman_Db_Record>

Returns all records which have a relation

Returns

array<mixed,\Fuman_Db_Record>

addRelationDeleteErrorRecord()

addRelationDeleteErrorRecord(\Fuman_Db_Record  $record) : void

Add record which has an relation delete error caused by an delete action on this record

Parameters

\Fuman_Db_Record $record

__set()

__set(string  $key, integer|string  $value) : void

Sets Value to $this->_columns

Parameters

string $key
integer|string $value

@ishacky

__get()

__get(string  $key) : integer|string

Returns Value of $this->_columns by key

Parameters

string $key

Returns

integer|string —

@ishacky

__isset()

__isset(string  $key) : boolean

Is set

Parameters

string $key

Returns

boolean

count()

count() : integer

Count columns

Returns

integer

rewind()

rewind() : void

Rewind

current()

current() : mixed

Current

Returns

mixed

key()

key() : mixed

Key

Returns

mixed

next()

next() : mixed

Next

Returns

mixed

valid()

valid() : boolean

Valid

Returns

boolean

collectSearchContent()

collectSearchContent(\Fuman_Db_SearchContent  $searchContent, integer  $depth, string|null  $path = null) : void

Collects searchable content (recursive depending on depth)

Parameters

\Fuman_Db_SearchContent $searchContent
integer $depth
string|null $path

copyTo()

copyTo(\Fuman_Db_Record  $record, boolean  $ignorePrimary = false) : void

Copy the values to an other record

Parameters

\Fuman_Db_Record $record
boolean $ignorePrimary

Do not copy the pirmary value

collectText()

collectText(integer  $collectionType, string  $language, boolean  $forHtml, integer|null  $depth, null|\stdClass  $visitedRecords = null, null|array<mixed,\Fuman_InputType>  $inputTypes = null) : array

Collects text

Parameters

integer $collectionType
string $language
boolean $forHtml
integer|null $depth
null|\stdClass $visitedRecords
null|array<mixed,\Fuman_InputType> $inputTypes

@ishacky

Returns

array

implodeCollectedText()

implodeCollectedText(array  $data, string  $stringGlue, string  $arrayGlue) : string

Implode collected text

Parameters

array $data
string $stringGlue
string $arrayGlue

This glue will only be used on the first level

Returns

string

getShowInOverviewText()

getShowInOverviewText(string|null  $language = null, integer  $depth) : string

Gets the "show in overview" text

Parameters

string|null $language
integer $depth

Returns

string

getShowInSummaryText()

getShowInSummaryText(string|null  $language = null, integer  $depth) : string

Gets the "show in summary" text

Parameters

string|null $language
integer $depth

Returns

string

getSummaryText()

getSummaryText(null|string  $language = null) : string

Gets the summary for record

Parameters

null|string $language

Returns

string

getText()

getText(string|null  $language = null, integer  $depth) : string

Gets text

Parameters

string|null $language
integer $depth

Returns

string

getUID()

getUID() : null|string

Returns the uid of the record, if not exists it generates it

Returns

null|string

updateUID()

updateUID(null  $newUID = null) 

Generates an new UID and relocates the properties

Parameters

null $newUID

if not null, change uid to this value

getCache()

getCache() : \Fuman_Db_Record_Cache

Returns or creates a cache instance for this record

Returns

\Fuman_Db_Record_Cache

invalidateCacheContainer()

invalidateCacheContainer(string  $key) 

Invalidates a cache container instance

Parameters

string $key

hasProperty()

hasProperty(string  $key) : boolean

if the key exists, it returns true The properties are stored in an static container, referenced by the record key

Parameters

string $key

Returns

boolean

getProperty()

getProperty(string  $key) : mixed

Get property, The properties are stored in an static container, referenced by the record key

Parameters

string $key

Returns

mixed —

null when the property don't exists

setProperty()

setProperty(string  $key, mixed  $value) : void

Set property The properties are stored in an static container, referenced by the record key

Parameters

string $key
mixed $value

__toString()

__toString() : string

To string

Returns

string

sleepRecords()

sleepRecords(array<mixed,\Fuman_Db_Record>  $records) : \stdClass

Converts an array of records into an object

Parameters

array<mixed,\Fuman_Db_Record> $records

Returns

\stdClass

wakeRecords()

wakeRecords(object  $frozen) : array

Converts an object back into an array of records

Parameters

object $frozen

Returns

array

_loadAclFromDb()

_loadAclFromDb() : void

Initializes acl from db

Throws

\Fuman_Exception

_loadFlagsFromDb()

_loadFlagsFromDb() 

Load flags from database

_save()

_save() : boolean

Save record

Returns

boolean

_delete()

_delete() : boolean

Deletes record

Returns

boolean