Class WPDA_Simple_Form_Item_Dynamic_Hyperlink
Add dynamic (read-only) hyperlink to form (taken from table settings: dynamic hyperlinks). Allows substitution of column values.
author | Peter Schulz |
---|---|
since | 3.0.3 |
package | WPDataAccess\Simple_Form |
inherited_from | \WPDataAccess\Simple_Form\WPDA_Simple_Form_Item |
__construct(array $args = array()
)
Declare item with all its properties.
inherited_from | \WPDataAccess\Simple_Form\WPDA_Simple_Form_Item::__construct() |
---|
array
__construct(array $args = array()
)
Declare item with all its properties.
since | 1.0.0 |
---|
array
[
'item_name' => item name
'data_type' => data type
'item_label' => label
'item_value' => value (in database)
'item_default_value' => default value
'item_extra' => check column extra in information_schema.columns
'item_enum' => enum (if applicable)
'item_enum_options' => enum options (if applicable)
'column_type' => type
'item_event' => JS event(s)
'item_js' => JS code (global)
'item_hide_icon' => icon (showing data type)
'item_class' => css class
'hide_item' => item visibility
'is_nullable' => allow null values?
'is_key_column' => is key column?
].
get_column_type() : string
since | 1.0.0 |
---|
string
get_data_type() : string
since | 1.0.0 |
---|
string
get_hide_item() : boolean
since | 1.6.9 |
---|
boolean
get_item_class() : string
since | 1.0.0 |
---|
string
get_item_default_value() : mixed
since | 1.0.0 |
---|
mixed
get_item_enum() : array
since | 1.0.0 |
---|
array
get_item_event() : String
since | 1.0.0 |
---|
String
get_item_extra() : mixed
get_item_hide_icon() : boolean
since | 1.0.0 |
---|
boolean
get_item_js() : mixed
since | 1.0.0 |
---|
mixed
get_item_label() : string
since | 1.0.0 |
---|
string
get_item_name() : string
since | 1.0.0 |
---|
string
get_item_value() : mixed
since | 1.0.0 |
---|
mixed
is_key_column() : boolean
since | 2.0.0 |
---|
boolean
is_nullable() : boolean
since | 2.0.0 |
---|
boolean
is_valid($pre_insert = false
) : boolean
boolean
set_data_type(string $data_type)
since | 1.6.9 |
---|
string
Item data type
set_enum(string $item_enum)
since | 1.6.9 |
---|
string
Item enum value list
set_hide_item(boolean $hide_item)
since | 1.6.9 |
---|
boolean
TRUE = hide item
set_is_key_column(boolean $is_key_column)
boolean
TRUE|FALSE
set_item_class(string $item_class)
since | 1.6.2 |
---|
string
HTML class name
set_item_default_value(string $item_default_value)
since | 1.6.2 |
---|
string
Default value
set_item_hide_icon(boolean $item_hide_icon)
since | 2.0.8 |
---|
boolean
TRUE = hide type icon behind text field
set_item_js(string $item_js)
since | 1.6.9 |
---|
string
Item specific javascript code
set_item_value(string $value)
string
Item value
set_label(string $label)
string
Item label
show(string $action, string $update_keys_allowed)
string
Requested action
string
TRUE = allow key updates
show_item()
Overwrite this method to define specific item processing like enum, set, image and so on.
inherited_from | \WPDataAccess\Simple_Form\WPDA_Simple_Form_Item::show_item() |
---|
show_item()
Overwrite this method to define specific item processing like enum, set, image and so on.
$column_type : string
Column type offers more info than data type, like column length or values for enum types.
$data_type : string
$hide_item : boolean
$hyperlink_html
''
$hyperlink_label
''
$hyperlink_target
''
$is_auto_increment : boolean
false
$is_key_column : boolean
$is_nullable : boolean
$item_class : string
$item_default_value : mixed
$item_enum : array
$item_event : array
Add event to item for example: ["onclick" => "check_item_value()"]
$item_extra : string
Like auto_increment, on update, etc
$item_hide_icon : boolean
TRUE = icon is shown after item, FALSE = hide icon (default FALSE)
$item_icon_type : string
$item_js : string
Code is added to the end of the form.
$item_label : string
$item_name : string
$item_placeholder : string
''
$item_value : mixed
$show_context_action : string
$show_context_class_primary_key : string
$show_context_column_value : string
$show_context_item_events : string
$show_context_update_keys_allowed : string