PHP Класс Backend\Modules\FormBuilder\Engine\Model

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
calculateTimeAgo ( integer $timestamp ) : string Calculate time ago.
createIdentifier ( ) : string Create an unique identifier.
delete ( integer $id ) Delete an item.
deleteData ( array $ids ) Deletes one or more data items.
deleteField ( integer $id ) Delete a field.
deleteFieldValidation ( integer $id ) Delete all validation of a field.
exists ( integer $id ) : boolean Does the item exist.
existsData ( integer $id ) : boolean Does the data item exist.
existsField ( integer $id, integer $formId = null ) : boolean Does a field exist (within a form).
existsIdentifier ( string $identifier, integer $ignoreId = null ) : boolean Does an identifier exist.
formatRecipients ( string $string ) : string Formats the recipients based on the serialized string
get ( integer $id ) : array Get all data for a given id.
getData ( integer $id ) : array Get data for a given id.
getErrors ( string $type = null ) : mixed Get errors (optional by type).
getField ( integer $id ) : array Get a field.
getFields ( integer $id ) : array Get all fields of a form.
getLocale ( string $name, string $type = 'label', string $application = 'Backend' ) : string Get a label/action/message from locale.
getMaximumSequence ( integer $formId ) : integer Get the maximum sequence for fields in a form.
insert ( array $values ) : integer Add a new item.
insertField ( array $values ) : integer Add a new field.
insertFieldValidation ( array $values ) : integer Add validation for a field.
update ( integer $id, array $values ) : integer Update an existing item.
updateField ( integer $id, array $values ) : integer Update a field.

Приватные методы

Метод Описание
identifierExist ( string $identifier ) : boolean

Описание методов

calculateTimeAgo() публичный статический метод

Calculate time ago.
public static calculateTimeAgo ( integer $timestamp ) : string
$timestamp integer Unix timestamp from the past.
Результат string

createIdentifier() публичный статический метод

Create an unique identifier.
public static createIdentifier ( ) : string
Результат string

delete() публичный статический метод

Delete an item.
public static delete ( integer $id )
$id integer The id of the record to delete.

deleteData() публичный статический метод

Deletes one or more data items.
public static deleteData ( array $ids )
$ids array Ids of data items.

deleteField() публичный статический метод

Delete a field.
public static deleteField ( integer $id )
$id integer Id of a field.

deleteFieldValidation() публичный статический метод

Delete all validation of a field.
public static deleteFieldValidation ( integer $id )
$id integer Id of a field.

exists() публичный статический метод

Does the item exist.
public static exists ( integer $id ) : boolean
$id integer Id of a form.
Результат boolean

existsData() публичный статический метод

Does the data item exist.
public static existsData ( integer $id ) : boolean
$id integer Id of the data item.
Результат boolean

existsField() публичный статический метод

Does a field exist (within a form).
public static existsField ( integer $id, integer $formId = null ) : boolean
$id integer Id of a field.
$formId integer Id of a form.
Результат boolean

existsIdentifier() публичный статический метод

Does an identifier exist.
public static existsIdentifier ( string $identifier, integer $ignoreId = null ) : boolean
$identifier string Identifier.
$ignoreId integer Field id to ignore.
Результат boolean

formatRecipients() публичный статический метод

Formats the recipients based on the serialized string
public static formatRecipients ( string $string ) : string
$string string The serialized string that should be formatted
Результат string

get() публичный статический метод

Get all data for a given id.
public static get ( integer $id ) : array
$id integer The id for the record to get.
Результат array

getData() публичный статический метод

Get data for a given id.
public static getData ( integer $id ) : array
$id integer The id for the record to get.
Результат array

getErrors() публичный статический метод

Get errors (optional by type).
public static getErrors ( string $type = null ) : mixed
$type string Type of error.
Результат mixed

getField() публичный статический метод

Get a field.
public static getField ( integer $id ) : array
$id integer Id of a field.
Результат array

getFields() публичный статический метод

Get all fields of a form.
public static getFields ( integer $id ) : array
$id integer Id of a form.
Результат array

getLocale() публичный статический метод

Used as datagridfunction.
public static getLocale ( string $name, string $type = 'label', string $application = 'Backend' ) : string
$name string Name of the locale item.
$type string Type of locale item.
$application string Name of the application.
Результат string

getMaximumSequence() публичный статический метод

Get the maximum sequence for fields in a form.
public static getMaximumSequence ( integer $formId ) : integer
$formId integer Id of the form.
Результат integer

insert() публичный статический метод

Add a new item.
public static insert ( array $values ) : integer
$values array The data to insert.
Результат integer

insertField() публичный статический метод

Add a new field.
public static insertField ( array $values ) : integer
$values array The data to insert.
Результат integer

insertFieldValidation() публичный статический метод

Add validation for a field.
public static insertFieldValidation ( array $values ) : integer
$values array The data to insert.
Результат integer

update() публичный статический метод

Update an existing item.
public static update ( integer $id, array $values ) : integer
$id integer The id for the item to update.
$values array The new data.
Результат integer

updateField() публичный статический метод

Update a field.
public static updateField ( integer $id, array $values ) : integer
$id integer The id for the item to update.
$values array The new data.
Результат integer