INLINE_PROTECTION_HASH_APP
INLINE_PROTECTION_HASH_APP
Represents an value which is unique in the database. When a value is already saved in database, the inputtype reformats the value till its unique.
$_mainColumn : \Fuman_Column
Main Column of InputType
$_inputTypeRecord : \Fuman_Db_Record
$_table : \Fuman_Table
Fuman_Table of Column
$_columns : array<mixed,\Fuman_Column_Abstract>
__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
integer|string | $fumanId | |
string | $uniqueName | |
\Fuman_Table | $table | |
null|string | $columnName | |
null|\stdClass | $config | |
null|\stdClass | $record |
setDefaultValues(\Fuman_Db_Record $record)
Sets default values
\Fuman_Db_Record | $record |
getFilterComponent() : \app_core_filter_text
Returns the appropriate filter component.
getFormComponent(\Fuman_Db_Record $record, string|null $language = null, \Fuman_Form_Model_Abstract $formModel = null) : \Fuman_InputType_Element
Gets translation form component
\Fuman_Db_Record | $record | |
string|null | $language | |
\Fuman_Form_Model_Abstract | $formModel |
getViewComponent(\Fuman_Db_Record $record, string|null $language = null, \Fuman_Form_Model_Abstract $formModel = null) : \Fuman_InputType_View
Gets view component
\Fuman_Db_Record | $record | |
string|null | $language | |
\Fuman_Form_Model_Abstract | $formModel |
setHelpMessages(\Fuman_InputType_Renderer_Abstract $renderer)
Sets help messages
\Fuman_InputType_Renderer_Abstract | $renderer |
getFormName(\Fuman_Db_Record|null $record, string|null $language = null, string|null $formNameSuffix = null, boolean $compute = false) : string
Returns formname of inputtype
\Fuman_Db_Record|null | $record | |
string|null | $language | |
string|null | $formNameSuffix | |
boolean | $compute |
getKey(\Fuman_Db_Record $record, string $language = null, string $keySuffix = null) : string
\Fuman_Db_Record | $record | |
string | $language | |
string | $keySuffix |
getText(\Fuman_Db_Record $record, string|null $language = null) : string
Gets text (text only representation of input type)
\Fuman_Db_Record | $record | |
string|null | $language |
collectText(\Fuman_Db_Record $record, integer $collectionType, string $language, boolean $forHtml, integer|null $depth, \stdClass|null $visitedRecords = null) : string
Collects text
\Fuman_Db_Record | $record | |
integer | $collectionType | |
string | $language | |
boolean | $forHtml | |
integer|null | $depth | |
\stdClass|null | $visitedRecords |
getListComponent(\Fuman_Db_Record $record, \Fuman_Db_RecordSet $recordSet, string|null $language = null) : string
Gets list component (by default this will call getText)
\Fuman_Db_Record | $record | |
\Fuman_Db_RecordSet | $recordSet | |
string|null | $language |
getListComponentAssets(\Fuman_Response_Data $data, \Fuman_Db_RecordSet $recordSet) : null
Get assets for list of this input type
\Fuman_Response_Data | $data | |
\Fuman_Db_RecordSet | $recordSet |
initConfigByRequest(\Fuman_Request $request, \Fuman_Form_Model_Basic $formModel, \Fuman_Db_Record $record)
Init config by request
\Fuman_Request | $request | |
\Fuman_Form_Model_Basic | $formModel | |
\Fuman_Db_Record | $record |
prepareConfig(\Fuman_Form_Model_Basic $formModel) : void
Prepare config component
\Fuman_Form_Model_Basic | $formModel |
initByRequest(\Fuman_Request $request, \Fuman_Db_Record $record) : void
Called before the record is saved
\Fuman_Request | $request | |
\Fuman_Db_Record | $record |
setValue(mixed $value, \Fuman_Db_Record $record, string|null $language = null)
Sets value
mixed | $value | |
\Fuman_Db_Record | $record | |
string|null | $language |
recordValidate(\Fuman_Db_Record $record) : void
Validate record
\Fuman_Db_Record | $record |
recordPreSave(\Fuman_Db_Record $record) : void
Record pre save
\Fuman_Db_Record | $record |
recordPostSave(\Fuman_Db_Record $record) : void
Called after the record is saved
\Fuman_Db_Record | $record |
recordPreDelete(\Fuman_Db_Record $record) : void
Record pre delete
\Fuman_Db_Record | $record |
recordPostDelete(\Fuman_Db_Record $record) : void
Record post delete
\Fuman_Db_Record | $record |
prepareRecordSetMeta(\Fuman_Db_RecordSetMeta $meta) : void
Prepare RecordSetMeta
\Fuman_Db_RecordSetMeta | $meta |
getTemplateDataLanguage(\Fuman_Db_Record $record, boolean $fallback = true) : string
Returns the language of the data returned by getTemplateData
\Fuman_Db_Record | $record | |
boolean | $fallback |
getTemplateData(\Fuman_Db_Record $record, null $language = null) : null|\stdClass
Returns an object with value (the e-mail address itself), scrambled (data-scrambled html attribute) and a placeholder (html-tag)
\Fuman_Db_Record | $record | |
null | $language |
getTemplateUsages() : array<mixed,\Fuman_Template_InputTypeUsage>
Gets usage for templating
getInlineHtmlAttribute(string $language, \Fuman_Db_Record $record, \Fuman_Response_Data $response, string|null $title = null) : string
Gets inline html attributes
string | $language | |
\Fuman_Db_Record | $record | |
\Fuman_Response_Data | $response | |
string|null | $title |
getInlineJavaScriptOptions(\Fuman_Db_Record $record, string $language, \Fuman_Response_Data $response) : object
Gets the inline javascript class options
\Fuman_Db_Record | $record | |
string | $language | |
\Fuman_Response_Data | $response |
getMainColumn() : \Fuman_Column|\Fuman_Column_ManyToMany|\Fuman_Column_ManyToOne|\Fuman_Column_OneToMany
Returns the main column of an inputtype
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
null|string | $tabName | |
boolean | $addInlineTranslationSpan |
getDataTypeFromConfig(integer $defaultType) : \Fuman_Db_DataType
Gets the datatype from config (datatype, datatype_length) or default
integer | $defaultType |
collectSearchContent(\Fuman_Db_Record $record, \Fuman_Db_SearchContent $searchContent, integer $depth, string|null $path = null) : void
Collects content for search index
\Fuman_Db_Record | $record | |
\Fuman_Db_SearchContent | $searchContent | |
integer | $depth | |
string|null | $path |
getColumns() : array<mixed,\Fuman_Column>
Returns a list of Columns
getColumn(string $columnName) : \Fuman_Column
Gets column for name
string | $columnName |
getTable() : \Fuman_Table
Gets table
setTable(\Fuman_Table $table) : void
Sets table
\Fuman_Table | $table |
_createMainColumn(integer|\Fuman_Db_DataType $dataType) : void
Creates and adds the main column
integer|\Fuman_Db_DataType | $dataType | @ishacky |
_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
integer|\Fuman_Db_DataType | $dataType | @ishacky |
string|null | $columnNameSuffix |
_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(\Fuman_Request $request, \Fuman_Db_Record $record, string|null $nameSuffix = null) : void
Called before the record is saved
\Fuman_Request | $request | |
\Fuman_Db_Record | $record | |
string|null | $nameSuffix |
_initByRequestAndLanguage(\Fuman_Request $request, \Fuman_Db_Record $record, string $language, string|null $nameSuffix = null) : void
Initializes record from request
\Fuman_Request | $request | |
\Fuman_Db_Record | $record | |
string | $language | |
string|null | $nameSuffix |
_getTemplateDataFallbackLanguage(\Fuman_Db_Record $record, string|null $language = null) : string
Returns the language to fallback to
\Fuman_Db_Record | $record | |
string|null | $language |
_getValueFromRecord(\Fuman_Db_Record $record, string|null $language = null, string|null $columnNameSuffix = null) : string|integer
Returns a value from record
\Fuman_Db_Record | $record | |
string|null | $language | |
string|null | $columnNameSuffix |
_getTranslatedName(string $name, string $language, string $suffix = '') : string
Gets translations column/form name Returns the appropriate column/form name, also for content default language
string | $name | |
string | $language | |
string | $suffix | only relevant for columns |
_addColumn(\Fuman_Column $column) : void
Adds column
\Fuman_Column | $column |