GravityKit\EntryTags\EntryTagField
Source: src/EntryTagField.php:18
Details
- Kind:
class - Namespace:
GravityKit\EntryTags - Extends: GF_Field_MultiSelect
Properties
| Property | Type | Description |
|---|---|---|
$type | $type | string |
Methods
| Method | Description |
|---|---|
filter_custom_content() | Decodes HTML entities in the content to return valid HTML for entry tags merge tags. |
replace_merge_tags() | Replaces merge tags with the entry tags field value. |
field_value_for_advanced_post_creation() | Overrides the field value for Advanced Post Creation. |
get_form_editor_field_title() | |
get_form_editor_field_description() | |
get_form_editor_field_icon() | |
get_form_editor_field_type_icon() | |
add_field_icon() | Adds field icon to the GravityView field list. |
field_options() | Adds choice_display setting to the field. |
allow_tag_search() | Allows tag search without Search Bar in the View. |
get_form_editor_button() | |
get_form_editor_field_settings() | |
get_field_input() | Returns the field inner markup. |
get_value_entry_detail() | Formats the entry value for display on the entry detail page and for the {all_fields} merge tag. |
get_value_entry_list() | |
get_tag_filter_link() | Returns a tag filter link in GravityView. |
get_output_gravityview() | Overrides output for GravityView display. |
filter_modify_tag_allowed_input_types() | Add the Input type allowed for the tag field id. |
after_gravityview_entry_edit() | Maybe create new tag(s) when the entry is edited in GravityView. |
Method Reference
filter_custom_content()
public function filter_custom_content( $content )
Decodes HTML entities in the content to return valid HTML for entry tags merge tags.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$content | string | The content to decode. |
Returns
string— The decoded content.
Since: 1.4.1
Source: src/EntryTagField.php:95
replace_merge_tags()
public function replace_merge_tags( $data, $text, $form )
Replaces merge tags with the entry tags field value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$data | array | The data array. | |
$text | string | The text. | |
$form | array | The form array. |
Returns
array— The data array.
Since: 1.4
Source: src/EntryTagField.php:114
field_value_for_advanced_post_creation()
public function field_value_for_advanced_post_creation( $field_value, $form, $entry, $field_id )
Overrides the field value for Advanced Post Creation.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$field_value | mixed | The field value. | |
$form | array | The form array. | |
$entry | array | The entry array. | |
$field_id | int | The field ID. |
Returns
mixed— The field value.
Since: 1.4
Source: src/EntryTagField.php:164
get_form_editor_field_title()
public function get_form_editor_field_title()
Returns
string
Since: 1.0.0
Source: src/EntryTagField.php:196
get_form_editor_field_description()
public function get_form_editor_field_description()
Source: src/EntryTagField.php:203
get_form_editor_field_icon()
public function get_form_editor_field_icon()
Returns
string
Since: 1.0.0
Source: src/EntryTagField.php:214
get_form_editor_field_type_icon()
public function get_form_editor_field_type_icon(): string
Returns
string
Since: $ver$
Source: src/EntryTagField.php:223
add_field_icon()
public function add_field_icon( $fields )
Adds field icon to the GravityView field list.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$fields | array | Associative array of fields. |
Returns
array
Since: 1.0.0
Source: src/EntryTagField.php:236
field_options()
public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id )
Adds choice_display setting to the field.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$field_options | array | ||
$template_id | string | ||
$field_id | string | ||
$context | string | ||
$input_type | string | ||
$form_id | string |
Returns
array
Since: 1.4
Source: src/EntryTagField.php:292
allow_tag_search()
public function allow_tag_search( $searchable_fields )
Allows tag search without Search Bar in the View.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$searchable_fields | array |
Returns
array
Since: 1.0.0
Source: src/EntryTagField.php:321
get_form_editor_button()
public function get_form_editor_button()
Returns
array
Since: 1.0.0
Source: src/EntryTagField.php:350
get_form_editor_field_settings()
public function get_form_editor_field_settings()
Returns
array
Since: 1.0.0
Source: src/EntryTagField.php:364
get_field_input()
public function get_field_input( $form, $value='', $entry=null )
Returns the field inner markup.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The Form Object currently being processed. | |
$value | string | array | '' | The field value. From default/dynamic population, $_POST, or a resumed incomplete submission. |
$entry | null | array | null | Null or the Entry Object currently being edited. |
Returns
string— The field input HTML markup.
Since: 1.0.0
Source: src/EntryTagField.php:390
get_value_entry_detail()
public function get_value_entry_detail( $value, $currency='', $use_text=false, $format='html', $media='screen' )
Formats the entry value for display on the entry detail page and for the {all_fields} merge tag.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | array | The field value. | |
$currency | string | '' | The entry currency code. |
$use_text | bool | false | false | When processing choice based fields should the choice text be returned instead of the value. |
$format | string | 'html' | The format requested for the location the merge is being used. Possible values: html, text or url. |
$media | string | 'screen' | The location where the value will be displayed. Possible values: screen or email. |
Returns
string— The list items, stored within an unordered list.
Since: 1.0.0
Source: src/EntryTagField.php:552
get_value_entry_list()
public function get_value_entry_list( $value, $entry, $field_id, $columns, $form )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | |||
$entry | |||
$field_id | |||
$columns | |||
$form |
Returns
string
Since: 1.0.0
Source: src/EntryTagField.php:634
get_tag_filter_link()
public function get_tag_filter_link( $tag_value, $form, $field_id, $context, $entry )
Returns a tag filter link in GravityView.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$tag_value | string | array | The tag value. | |
$form | array | The form object currently being processed. | |
$field_id | string | The field or input ID currently being processed. | |
$context | Template_Context | null | If GravityView is rendering the field, this will be a Template_Context object. Otherwise, null. | |
$entry | array | The entry object currently being processed. |
Returns
string|null— $value The value of the filter link.
Since: 1.1.0
Source: src/EntryTagField.php:655
get_output_gravityview()
public function get_output_gravityview( $output, $context )
Overrides output for GravityView display.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$output | string | The current output. | |
$context | Template_Context | The template context this is being called from. |
Returns
string
Source: src/EntryTagField.php:811
filter_modify_tag_allowed_input_types()
public function filter_modify_tag_allowed_input_types( $input_type, $field_type )
Add the Input type allowed for the tag field id.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input_type | string | string[] | ||
$field_type | string |
Returns
string
Since: 1.0.0
Source: src/EntryTagField.php:829
after_gravityview_entry_edit()
static function after_gravityview_entry_edit( $form, $entry_id, $edit_entry )
Maybe create new tag(s) when the entry is edited in GravityView.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | Gravity Forms form. | |
$entry_id | string | ID of the entry that was updated. | |
$edit_entry | GravityView_Edit_Entry_Render | Edit Entry instance. |
Returns
void
Since: 1.1.0
Source: src/EntryTagField.php:850