Properties

$Fields

$Fields : 

Model fields.

Type

$EntityName

$EntityName : 

Entity name.

Type

Methods

__construct()

__construct(  $Fields,   $EntityName) 

Constructor.

// TODO Add ParametersFetcher here, to eleminate all readings from the $_POST global array

Parameters

$Fields
$EntityName

skip_field()

skip_field(  $Name) 

Do we need to skip fields.

Parameters

$Name

get_disabled()

get_disabled(  $Name) 

Method return disabled prop if the field must be disabled.

Parameters

$Name

get_field_name()

get_field_name(  $Name) 

Method returns custom field's name.

Parameters

$Name

get_field_title()

get_field_title(  $Name,   $Field) 

Method returns field title.

Parameters

$Name
$Field

is_required()

is_required(  $Name) 

Is field required?

Parameters

$Name

has_custom_fields()

has_custom_fields() 

Method returns true if the entity has custom fields.

False otherwise.

get()

get() 

Method returns fields.

get_typed_value()

get_typed_value(  $Type,   $Value,   $StoreFiles = true) 

Method returns typed value.

Parameters

$Type
$Value
$StoreFiles

validate_field_existance()

validate_field_existance(string  $Field) 

Method validates if the field $Field exists.

Parameters

string $Field
  • Field name.

get_secure_value()

get_secure_value(string  $Field, mixed  $Value, boolean  $StoreFiles = true) : mixed

Getting secure value.

Parameters

string $Field
  • Field name.
mixed $Value
  • Field value.
boolean $StoreFiles
  • Should we store files.

Returns

mixed —

Secure value of the field.

get_secure_values()

get_secure_values(string  $Field, mixed  $Values, boolean  $StoreFiles = true) : array

Getting secure values.

Parameters

string $Field
  • Field name.
mixed $Values
  • Field values.
boolean $StoreFiles
  • Should we store files.

Returns

array —

Secure values of the field.

get_values_for_prefix()

get_values_for_prefix(  $Prefix,   $StoreFiles = true) 

Method returns field wich names are started from $Prefix.

Parameters

$Prefix
$StoreFiles

get_secure_search_value()

get_secure_search_value(  $Field,   $Value) 

Get secure search value.

Parameters

$Field
$Value

add_filter_condition_from_arr()

add_filter_condition_from_arr(  $Arr,   $Where) 

Method adds where condition.

Parameters

$Arr
$Where

add_filter_condition()

add_filter_condition(  $Where) 

Method adds where condition.

Parameters

$Where

get_field_value()

get_field_value(  $Name,   $Record) 

Method returns field value from GET/POST request.

Parameters

$Name
$Record

remove_field()

remove_field(  $FieldName) 

Method removes field.

Parameters

$FieldName

fetch_custom_field()

fetch_custom_field(  $Record,   $Name) 

Method fetches returns custom fields for saving.

Parameters

$Record
$Name

fetch_field()

fetch_field(  $Record,   $Name) 

Method fetches submitted field.

Parameters

$Record
$Name

get_operator()

get_operator(  $Item) 

Method returns simple operator.

Parameters

$Item

get_statement()

get_statement(  $Item) 

Method compiles statement.

Parameters

$Item

get_arg()

get_arg(string  $Arg, mixed  $Op = false) : string

Method returns argument.

Parameters

string $Arg
  • Argument name orr value.
mixed $Op
  • Operator.

Returns

string —

Argument.

compile_where()

compile_where(  $Arr,   $Where) 

Complex where compilation.

Parameters

$Arr
$Where

get_string_value()

get_string_value(  $Value) 

Returning string value.

Parameters

$Value

get_file_value()

get_file_value(  $Value,   $StoreFiles) 

Method returns file value.

Parameters

$Value
$StoreFiles

get_date_value()

get_date_value(  $Value) 

Returning date value.

Parameters

$Value

get_external_value()

get_external_value(  $Value) 

Returning date value.

Parameters

$Value