29 $this->label = esc_html__(
'Payment Amount',
'gk-gravityview' );
31 add_filter(
'gravityview_field_entry_value_' . $this->name .
'_pre_link', array( $this,
'get_content' ), 10, 4 );
32 add_filter(
'gravityview/field/payment_amount/value', array( $this,
'get_value' ), 10, 6 );
34 parent::__construct();
57 $return = GFCommon::to_money( $amount, \
GV\Utils::get(
$entry,
'currency' ) );
97 foreach ( $matches as $match ) {
99 $full_tag = $match[0];
100 $modifier = isset( $match[1] ) ? $match[1] :
false;
104 $formatted_amount = (
'raw' === $modifier ) ? $amount : GFCommon::to_money( $amount, \
GV\Utils::get(
$entry,
'currency' ) );
106 $return = str_replace( $full_tag, $formatted_amount, $return );
109 unset( $formatted_amount, $amount, $full_tag, $matches );
Modify field settings by extending this class.
get_content( $output='', $entry=array(), $field_settings=array(), $field=array())
Filter the value of the field.
$field_settings['content']
if(gravityview() ->plugin->is_GF_25()) $form
__construct()
GravityView_Field_Payment_Amount constructor.
replace_merge_tag( $matches=array(), $text='', $form=array(), $entry=array(), $url_encode=false, $esc_html=false)
Add {payment_amount} merge tag.
get_value( $value, $field, $view, $source, $entry, $request)
Filter the value of the field, future.
static get( $array, $key, $default=null)
Grab a value from an array or an object or default.
new GravityView_Field_Payment_Amount