\Fuman_InputType_Configuration

Configuration input type

Summary

Methods
Properties
Constants
__construct()
init()
setDefaultValues()
getFilterComponent()
isFilterable()
getFormComponent()
getViewComponent()
setHelpMessages()
getFormName()
getKey()
getText()
collectText()
getListComponent()
getListComponentAssets()
initConfigByRequest()
prepareConfig()
initByRequest()
setValue()
recordValidate()
recordPreSave()
recordPostSave()
recordPreDelete()
recordPostDelete()
prepareRecordSetMeta()
getTemplateDataLanguage()
getTemplateData()
getValidationGroupColumnNames()
getTemplateUsages()
getInlineHtmlAttribute()
getInlineJavaScriptClass()
getInlineJavaScriptOptions()
getMainColumn()
hasMainColumn()
getConfigValue()
hasConfigValue()
hasConfigValues()
setConfigValue()
getConfigValueOrDefault()
getFumanId()
setFumanId()
getUniqueName()
setUniqueName()
getColumnName()
hasColumnName()
setDisplayName()
getDisplayName()
setHtmlDisplayName()
getHtmlDisplayName()
setShowInOverview()
showInOverview()
showInSummary()
setShowInSummary()
setConfig()
getConfig()
getInputTypeRecord()
isSearchable()
getSearchIndexBreakPoints()
isRequired()
isTranslatable()
hasTranslatableView()
isOrderable()
hasHelpMessage()
getHelpMessage()
setHelpMessage()
getTabName()
getTranslatedTabName()
getDataTypeFromConfig()
collectSearchContent()
getColumns()
getColumn()
hasColumn()
getTable()
setTable()
getSelectedInputTypeFormComponent()
getFormModelFromRecord()
getConfigByDbRecord()
decodeConfig()
encodeConfig()
getConfigurableFromRecord()
No public properties found
INLINE_PROTECTION_HASH_APP
INLINE_PROTECTION_HASH_ACTION
FORMNAME_USE_UID
_initFromProperties()
_initFromConfig()
_createMainColumn()
_createTranslationColumn()
_handleTranslatableColumnSuffix()
_initByRequest()
_initByRequestAndLanguage()
_getTemplateDataFallbackLanguage()
_getValueFromRecord()
_getTranslatedName()
_getTabTranslationKey()
_createColumns()
_addColumn()
_collectClasses()
_initConfigurableByRecord()
_getClassType()
_getClassTypeParents()
_getTemplatePath()
$_name
$_fumanId
$_uniqueName
$_columnName
$_translatedColumnNames
$_translatedFormNames
$_mainColumn
$_config
$_inputTypeRecord
$_displayName
$_htmlDisplayName
$_showInOverview
$_showInSummary
$_isSearchable
$_helpMessage
$_suffixedFallbackRules
$_table
$_columns
$_configKey
$_hiddenConfigKeys
$_collectedClassesCache
N/A
No private methods found
No private properties found
N/A

Constants

INLINE_PROTECTION_HASH_APP

INLINE_PROTECTION_HASH_APP

INLINE_PROTECTION_HASH_ACTION

INLINE_PROTECTION_HASH_ACTION

FORMNAME_USE_UID

FORMNAME_USE_UID

Properties

$_name

$_name : string

Class name of inputtype

Type

string

$_fumanId

$_fumanId : integer

fuman-id of InputType

Type

integer

$_uniqueName

$_uniqueName : string

Unique Name of Column

Type

string

$_columnName

$_columnName : string

Name of Main Column

Type

string

$_translatedColumnNames

$_translatedColumnNames : array

Translatet columnames array( $language=>$translatetColumnName )

Type

array

$_translatedFormNames

$_translatedFormNames : array

Translatet formnames array( $language=>$translatetFormName )

Type

array

$_mainColumn

$_mainColumn : \Fuman_Column

Main Column of InputType

Type

\Fuman_Column

$_config

$_config : object

Config of Inputtype

Type

object

$_displayName

$_displayName : string

Display Name of String

Type

string

$_htmlDisplayName

$_htmlDisplayName : 

Type

$_showInOverview

$_showInOverview : boolean

Type

boolean

$_showInSummary

$_showInSummary : boolean

Type

boolean

$_isSearchable

$_isSearchable : boolean

Type

boolean

$_helpMessage

$_helpMessage : null|string

Type

null|string

$_suffixedFallbackRules

$_suffixedFallbackRules : 

Type

$_table

$_table : \Fuman_Table

Fuman_Table of Column

Type

\Fuman_Table

$_configKey

$_configKey : string

Type

string

$_hiddenConfigKeys

$_hiddenConfigKeys : string

Configs keys which are the same over all inputtypes and not editable through the interface

Type

string

$_collectedClassesCache

$_collectedClassesCache : 

Type

Methods

__construct()

__construct(integer|string  $fumanId, string  $uniqueName, \Fuman_Table  $table, null|string  $columnName = null, null|\stdClass  $config = null, null|\stdClass  $record = null) 

Constructor Internally calls _createColumn, then _init

Parameters

integer|string $fumanId
string $uniqueName
\Fuman_Table $table
null|string $columnName
null|\stdClass $config
null|\stdClass $record

init()

init() : void

Init Call _initFromProperties, _initFromConfig

setDefaultValues()

setDefaultValues(\Fuman_Db_Record  $record) 

Sets default values

Parameters

\Fuman_Db_Record $record

isFilterable()

isFilterable() : boolean

Is input type filterable

Returns

boolean

getFormName()

getFormName(\Fuman_Db_Record|null  $record, string|null  $language = null, string|null  $formNameSuffix = null, boolean  $compute = false) : string

Returns formname of inputtype

Parameters

\Fuman_Db_Record|null $record
string|null $language
string|null $formNameSuffix
boolean $compute

Returns

string

getKey()

getKey(\Fuman_Db_Record  $record, string  $language = null, string  $keySuffix = null) : string

Parameters

\Fuman_Db_Record $record
string $language
string $keySuffix

Returns

string

getText()

getText(\Fuman_Db_Record  $record, string|null  $language = null) : string

Gets text (text only representation of input type)

Parameters

\Fuman_Db_Record $record
string|null $language

Returns

string

collectText()

collectText(\Fuman_Db_Record  $record, integer  $collectionType, string  $language, boolean  $forHtml, integer|null  $depth, \stdClass|null  $visitedRecords = null) : string

Collects text

Parameters

\Fuman_Db_Record $record
integer $collectionType
string $language
boolean $forHtml
integer|null $depth
\stdClass|null $visitedRecords

Returns

string

getListComponent()

getListComponent(\Fuman_Db_Record  $record, \Fuman_Db_RecordSet  $recordSet, string|null  $language = null) : string

Gets list component (by default this will call getText)

Parameters

\Fuman_Db_Record $record
\Fuman_Db_RecordSet $recordSet
string|null $language

Returns

string

getListComponentAssets()

getListComponentAssets(\Fuman_Response_Data  $data, \Fuman_Db_RecordSet  $recordSet) : null

Get assets for list of this input type

Parameters

\Fuman_Response_Data $data
\Fuman_Db_RecordSet $recordSet

Returns

null

prepareConfig()

prepareConfig(\Fuman_Form_Model_Basic  $formModel) : void

Prepare config component

Parameters

\Fuman_Form_Model_Basic $formModel

initByRequest()

initByRequest(\Fuman_Request  $request, \Fuman_Db_Record  $record) : void

Validate configuration by validators and by asking the inputtype

Parameters

\Fuman_Request $request
\Fuman_Db_Record $record

setValue()

setValue(mixed  $value, \Fuman_Db_Record  $record, string|null  $language = null) 

Sets value

Parameters

mixed $value
\Fuman_Db_Record $record
string|null $language

recordValidate()

recordValidate(\Fuman_Db_Record  $record) : void

Record validate

Parameters

\Fuman_Db_Record $record

recordPreSave()

recordPreSave(\Fuman_Db_Record  $record) : void

Record pre save

Parameters

\Fuman_Db_Record $record

recordPostSave()

recordPostSave(\Fuman_Db_Record  $record) : void

Inform inputtype, when config is saved

Parameters

\Fuman_Db_Record $record

recordPreDelete()

recordPreDelete(\Fuman_Db_Record  $record) : void

Record pre delete

Parameters

\Fuman_Db_Record $record

recordPostDelete()

recordPostDelete(\Fuman_Db_Record  $record) : void

Record post delete

Parameters

\Fuman_Db_Record $record

prepareRecordSetMeta()

prepareRecordSetMeta(\Fuman_Db_RecordSetMeta  $meta) : void

Prepare RecordSetMeta

Parameters

\Fuman_Db_RecordSetMeta $meta

getTemplateDataLanguage()

getTemplateDataLanguage(\Fuman_Db_Record  $record, boolean  $fallback = true) : string

Returns the language of the data returned by getTemplateData

Parameters

\Fuman_Db_Record $record
boolean $fallback

Returns

string

getTemplateData()

getTemplateData(\Fuman_Db_Record  $record, string|null  $language = null) : mixed|string

Gets front end text (text only representation of input type)

Parameters

\Fuman_Db_Record $record
string|null $language

Returns

mixed|string

getValidationGroupColumnNames()

getValidationGroupColumnNames() : array|null

Returns an array of column names which can be used in validation groups

Returns

array|null

getTemplateUsages()

getTemplateUsages() : array<mixed,\Fuman_Template_InputTypeUsage>

Gets usage for templating

Returns

array<mixed,\Fuman_Template_InputTypeUsage>

getInlineHtmlAttribute()

getInlineHtmlAttribute(string  $language, \Fuman_Db_Record  $record, \Fuman_Response_Data  $response, string|null  $title = null) : string

Gets inline html attributes

Parameters

string $language
\Fuman_Db_Record $record
\Fuman_Response_Data $response
string|null $title

Returns

string

getInlineJavaScriptClass()

getInlineJavaScriptClass() : null

Gets the inline javascript class

Returns

null

getInlineJavaScriptOptions()

getInlineJavaScriptOptions(\Fuman_Db_Record  $record, string  $language, \Fuman_Response_Data  $response) : object

Gets the inline javascript class options

Parameters

\Fuman_Db_Record $record
string $language
\Fuman_Response_Data $response

Returns

object

hasMainColumn()

hasMainColumn() : boolean

Has the inputType a min column

Returns

boolean

getConfigValue()

getConfigValue(string  $key) : mixed

Get config value

Parameters

string $key

Returns

mixed

hasConfigValue()

hasConfigValue(string  $key) : string

Returns true when config value is set

Parameters

string $key

Returns

string

hasConfigValues()

hasConfigValues() : boolean

Returns true when all keys are set

Returns

boolean

setConfigValue()

setConfigValue(string  $key, string  $value) : void

Set Config Value

Parameters

string $key
string $value

getConfigValueOrDefault()

getConfigValueOrDefault(string  $key, mixed|null  $default = null) : mixed

Returns a config value or default

Parameters

string $key
mixed|null $default

Returns

mixed

getFumanId()

getFumanId() : integer|null

Get fuman Id

Returns

integer|null

setFumanId()

setFumanId(integer|string  $fumanId) : void

Set fuman id

Parameters

integer|string $fumanId

getUniqueName()

getUniqueName() : string

Get uniquename

Returns

string

setUniqueName()

setUniqueName(string  $uniqueName) : void

Set uniquename

Parameters

string $uniqueName

getColumnName()

getColumnName(string|null  $language = null, string|null  $columnNameSuffix = null) : string

Get column name

Parameters

string|null $language
string|null $columnNameSuffix

Returns

string

hasColumnName()

hasColumnName() : boolean

Has column name

Returns

boolean

setDisplayName()

setDisplayName(string  $displayName) : void

Set display name

Parameters

string $displayName

getDisplayName()

getDisplayName() : string

Get display name

Returns

string

setHtmlDisplayName()

setHtmlDisplayName(string  $htmlDisplayName) : void

Sets html display name (may include html tags)

Parameters

string $htmlDisplayName

getHtmlDisplayName()

getHtmlDisplayName() : null|string

Gets html display name (Returns default display name if html display name not set)

Returns

null|string

setShowInOverview()

setShowInOverview(boolean  $showInOverview) : void

Set Show in Overview

Parameters

boolean $showInOverview

showInOverview()

showInOverview() : boolean

Get show in overview

Returns

boolean

showInSummary()

showInSummary() : boolean

Show in reference

Returns

boolean

setShowInSummary()

setShowInSummary(boolean  $showInSummary) : void

Sets flag to be shown in references

Parameters

boolean $showInSummary

setConfig()

setConfig(\stdClass  $config) : void

Set Config

Parameters

\stdClass $config

getConfig()

getConfig() : \stdClass

Get Config

Returns

\stdClass

getInputTypeRecord()

getInputTypeRecord() : \stdClass

Get input type record

Returns

\stdClass

isSearchable()

isSearchable() : boolean

Is searchable

Returns

boolean

getSearchIndexBreakPoints()

getSearchIndexBreakPoints() : null|array

Gets the search index break points

Returns

null|array

isRequired()

isRequired() : mixed

Is this inputtype required (layout * behind label)

Returns

mixed

isTranslatable()

isTranslatable() : boolean

Is translatable

Returns

boolean

hasTranslatableView()

hasTranslatableView() : boolean

its possible to draw this inputtype in a half width row

Returns

boolean —

true

isOrderable()

isOrderable() : boolean

Is orderable

Returns

boolean

hasHelpMessage()

hasHelpMessage() : boolean

Has help message

Returns

boolean

getHelpMessage()

getHelpMessage() : null|string

Gets help message

Returns

null|string

setHelpMessage()

setHelpMessage(string  $message) 

Sets help message

Parameters

string $message

getTabName()

getTabName() : string

Gets tab name

Returns

string

getTranslatedTabName()

getTranslatedTabName(null|string  $tabName = null, boolean  $addInlineTranslationSpan = true) : string

Returns the translation value for tab key ('fuman_inputtype_tabname_'.$tabKey) if the parameter $tabKey is null, it uses the own methode getTabKey to fetch it.

this behaviour is used in the add Action

Parameters

null|string $tabName
boolean $addInlineTranslationSpan

Returns

string

getDataTypeFromConfig()

getDataTypeFromConfig(integer  $defaultType) : \Fuman_Db_DataType

Gets the datatype from config (datatype, datatype_length) or default

Parameters

integer $defaultType

Returns

\Fuman_Db_DataType

collectSearchContent()

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

Collects content for search index

Parameters

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

getColumns()

getColumns() : array<mixed,\Fuman_Column>

Returns a list of Columns

Returns

array<mixed,\Fuman_Column>

getColumn()

getColumn(string  $columnName) : \Fuman_Column

Gets column for name

Parameters

string $columnName

Returns

\Fuman_Column

hasColumn()

hasColumn(string  $columnName) : boolean

Has column

Parameters

string $columnName

Returns

boolean

getTable()

getTable() : \Fuman_Table

Gets table

Returns

\Fuman_Table

setTable()

setTable(\Fuman_Table  $table) : void

Sets table

Parameters

\Fuman_Table $table

getSelectedInputTypeFormComponent()

getSelectedInputTypeFormComponent(\Fuman_Db_Record  $record, \stdClass  $data) : \Fuman_InputType_Renderer

Gets selected input type from component

Parameters

\Fuman_Db_Record $record
\stdClass $data

Returns

\Fuman_InputType_Renderer

getConfigByDbRecord()

getConfigByDbRecord(\Fuman_Db_Record  $record) : \stdClass

Get Fuman_InputType_Config by Fuman_Db_Record

Parameters

\Fuman_Db_Record $record

Returns

\stdClass

decodeConfig()

decodeConfig(string  $configText) : \stdClass

Decodes config (JSON)

Parameters

string $configText

Returns

\stdClass

encodeConfig()

encodeConfig(\stdClass  $config) : float|null|string

Encodes config (JSON)

Parameters

\stdClass $config

Returns

float|null|string

_initFromProperties()

_initFromProperties() : void

Initializes the inputtype with the properties from the inputTypeRecord

_initFromConfig()

_initFromConfig() : void

Initializes the inputtype by config Called at the end of the init process

_createMainColumn()

_createMainColumn(integer|\Fuman_Db_DataType  $dataType) : void

Creates and adds the main column

Parameters

integer|\Fuman_Db_DataType $dataType

@ishacky

_createTranslationColumn()

_createTranslationColumn(integer|\Fuman_Db_DataType  $dataType, string|null  $columnNameSuffix = null) : void

Creates and adds the translation columns if $this->isTranslatable() is true and it has some Content-Translation-Languages on the table

Parameters

integer|\Fuman_Db_DataType $dataType

@ishacky

string|null $columnNameSuffix

_handleTranslatableColumnSuffix()

_handleTranslatableColumnSuffix() 

sets the suffix for the columnName and update the columnName if config value application.use_translatable_column_suffix is set or table has getUseTranslatableColumnSuffix and the inputType has no own translatableColumnSuffix defined

_initByRequest()

_initByRequest(\Fuman_Request  $request, \Fuman_Db_Record  $record, string|null  $nameSuffix = null) : void

Called before the record is saved

Parameters

\Fuman_Request $request
\Fuman_Db_Record $record
string|null $nameSuffix

_initByRequestAndLanguage()

_initByRequestAndLanguage(\Fuman_Request  $request, \Fuman_Db_Record  $record, string  $language, string|null  $nameSuffix = null) : void

Initializes record from request

Parameters

\Fuman_Request $request
\Fuman_Db_Record $record
string $language
string|null $nameSuffix

_getTemplateDataFallbackLanguage()

_getTemplateDataFallbackLanguage(\Fuman_Db_Record  $record, string|null  $language = null) : string

Returns the language to fallback to

Parameters

\Fuman_Db_Record $record
string|null $language

Returns

string

_getValueFromRecord()

_getValueFromRecord(\Fuman_Db_Record  $record, string|null  $language = null, string|null  $columnNameSuffix = null) : string|integer

Returns a value from record

Parameters

\Fuman_Db_Record $record
string|null $language
string|null $columnNameSuffix

Returns

string|integer

_getTranslatedName()

_getTranslatedName(string  $name, string  $language, string  $suffix = '') : string

Gets translations column/form name Returns the appropriate column/form name, also for content default language

Parameters

string $name
string $language
string $suffix

only relevant for columns

Returns

string

_getTabTranslationKey()

_getTabTranslationKey(string|null  $tabName = null) : string

Gets translation tab key

Parameters

string|null $tabName

Returns

string

_createColumns()

_createColumns() : void

Create columns

_addColumn()

_addColumn(\Fuman_Column  $column) : void

Adds column

Parameters

\Fuman_Column $column

_collectClasses()

_collectClasses(string  $type, array<mixed,string>  $parentClassNames, boolean  $orderByText = true) : array

Collect classes for type

Parameters

string $type

inputtype|action|...

array<mixed,string> $parentClassNames
boolean $orderByText

Returns

array

_getClassType()

_getClassType() : string

To search all class files, which should be displayed, the class-type has to be provided by the concrete class.

Returns

string

_getClassTypeParents()

_getClassTypeParents() : array<mixed,string>

Gets class type parents

Returns

array<mixed,string>

_getTemplatePath()

_getTemplatePath() : void

Returns template path of the concrete-class.