5 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
18 public static $slug =
'list';
30 $entry = $this->entry->from_field( $field );
37 $source = is_numeric( $field->ID ) ? ( GF_Form::by_id( $field->form_id ) ? : $this->view->form ) :
new Internal_Source();
39 $value = $renderer->render( $field, $this->view, $source,
$entry, $this->request );
41 $context = Template_Context::from_template( $this, compact(
'field',
'entry' ) );
46 $label = apply_filters(
'gravityview_render_after_label', $field->get_label( $this->view,
$form,
$entry ), $field->as_configuration() );
47 $label = apply_filters(
'gravityview/template/field_label', $label, $field->as_configuration(), is_numeric( $field->ID ) ? ( $source->form ? $source->form : null ) : null,
$entry->as_entry() );
55 $label = apply_filters(
'gravityview/template/field/label', $label, $context );
62 $hide_empty = apply_filters(
'gravityview/render/hide-empty-zone', Utils::get( $extras,
'hide_empty', $this->view->settings->get(
'hide_empty',
false ) ), $context );
64 if ( is_numeric( $field->ID ) ) {
65 $extras[
'field'] = $field->as_configuration();
68 $extras[
'entry'] = $this->entry->as_entry();
69 $extras[
'hide_empty'] = $hide_empty;
86 if ( ! is_array( $zones ) ) {
87 $zones = array( $zones );
91 foreach ( $zones as $zone ) {
92 $zone_var = str_replace(
'-',
'_', $zone );
93 $vars[ $zone_var ] = $this->view->fields->by_position(
'single_list-' . $zone )->by_visible( $this->view );
94 $vars[
"has_$zone_var" ] = $vars[ $zone_var ]->count();
If this file is called directly, abort.
the_field(\GV\Field $field, $extras=null)
Output the field in the list view.
if(gravityview() ->plugin->is_GF_25()) $form
If this file is called directly, abort.
If this file is called directly, abort.
If this file is called directly, abort.
extract_zone_vars( $zones)
Return an array of variables ready to be extracted.
If this file is called directly, abort.
gravityview_field_output( $passed_args, $context=null)
Output field based on a certain html markup.