Render a singular view for the Pod item content.

@param array|string|null $fields (optional) Fields to show in the view, defaults to all fields.

@return mixed
@since 2.3.10
501566
public function view( $fields = null ) {

		$pod =& $this;

		// Convert comma separated list of fields to an array.
		if ( null !== $fields && ! is_array( $fields ) && 0 < strlen( $fields ) ) {
			$fields = explode( ',', $fields );
		}

		$object_fields = (array) pods_v( 'object_fields', $this->pod_data, array(), true );

		if ( empty( $fields ) ) {
			// Add core object fields if $fields is empty.
			$fields = array_merge( $object_fields, $this->fields );
		}

		// Temporary.
		$view_fields = $fields;

		$fields = array();

		foreach ( $view_fields as $name => $field ) {
			$defaults = array(
				'name' => $name,
			);

			if ( ! is_array( $field ) ) {
				$name = $field;

				$field = array(
					'name' => $name,
				);
			}

			// @codingStandardsIgnoreLine.
			$field = array_merge( $defaults, $field );

			$field['name'] = trim( $field['name'] );

			if ( empty( $field['name'] ) ) {
				$field['name'] = trim( $name );
			}

			if ( isset( $object_fields[ $field['name'] ] ) ) {
				// @codingStandardsIgnoreLine.
				$field = array_merge( $field, $object_fields[ $field['name'] ] );
			} elseif ( isset( $this->fields[ $field['name'] ] ) ) {
				// @codingStandardsIgnoreLine.
				$field = array_merge( $this->fields[ $field['name'] ], $field );
			}

			if ( pods_v( 'hidden', $field, false, true ) || 'hidden' === $field['type'] ) {
				continue;
			} elseif ( ! PodsForm::permission( $field['type'], $field['name'], $field['options'], $fields, $pod, $pod->id() ) ) {
				continue;
			}

			$fields[ $field['name'] ] = $field;
		}//end foreach

		// Cleanup.
		unset( $view_fields );

		$output = pods_view( PODS_DIR . 'ui/front/view.php', compact( array_keys( get_defined_vars() ) ), false, 'cache', true );

		return $this->do_hook( 'view', $output, $fields, $this->id() );

	}
1338913
private function show_single_field( $items, $field ) {
		$key    = null;
		$values = array();

		foreach ( $items as $item ) {
			$item = (object) $item;

			if ( null === $key ) {
				$key = $this->find_item_key( $item, $field );
			}

			if ( 'json' === $this->args['format'] ) {
				$values[] = $item->$key;
			} else {
				\WP_CLI::print_value(
					$item->$key,
					array(
						'format' => $this->args['format'],
					)
				);
			}
		}

		if ( 'json' === $this->args['format'] ) {
			echo json_encode( $values );
		}
	}
1328496
private function renderView($links)
	{
		$defaults = $this->defaults;

		return View::make($this->view, compact('links', 'defaults'))->render();
	}
408518
public function fields($fields) {

        if ( is_array($fields) ) {
            $this->fields = '`'.implode("`, `", $fields).'`';
        } else if ( is_string($fields) ) {
            $this->fields = $fields;
        } else {
            $this->fields = '*';
        }
        return $this;
    }
791816
public function whereNull($fields)
    {
        if (!is_array($fields)) {
            $fields = [$fields];
        }

        $exp = $this->newExpr();

        foreach ($fields as $field) {
            $exp->isNull($field);
        }

        return $this->where($exp);
    }
549871
function render_field( $field ) {

		$maxrows = null;

		$disablesort = null;

		$defaultheaders = null;


		// vars
		$o = array( 'id', 'name' );
		$s = array( 'readonly', 'disabled' );
		$e = '';


		// maxlength
		if( $field['maxrows'] !== '' ) {

			$maxrows = 'data-maxrows="'.$field['maxrows'].'"';

		}

						// disable sort
		if( !empty($field['disable_sort']) ) $disablesort = ' data-disablesort="'.$field['disable_sort'].'"';

		// rows
		if( !empty($field['fixed_columns']) ) {

			$defaultheaders = preg_split( '/\r\n|\r|\n/',  $field['default_headers'] );

			$defaultheaders = 'data-defaultheaders="'.implode(",", $defaultheaders) .'"';
			if( empty($field['default_headers']) ) $defaultheaders = 'data-defaultheaders="No Default Headers Set"';

		}




		// populate atts
		$atts = array();
		foreach( $o as $k ) {

			$atts[ $k ] = $field[ $k ];

		}



		// special atts
		foreach( $s as $k ) {

			if( $field[ $k ] ) {

				$atts[ $k ] = $k;

			}

		}



		$e .= '<textarea style="display:none" '.$maxrows.' '.$disablesort.' '.$defaultheaders.' data-key="'.$field['key'].'" ' . acf_esc_attr( $atts ) . ' >';
		$e .= esc_textarea( $field['value'] );
		$e .= '</textarea>';


		// return
		echo $e;

	}
76797
protected function parseAction($fields, $default) {
    if (empty($fields[self::PREFIX]['action'])) {
      return $default;
    }
    else {
      if (is_array($fields[self::PREFIX]['action'])) {
        foreach ($fields[self::PREFIX]['action'] as $name => $label) {
          return $name;
        }
      }
      elseif (is_string($fields[self::PREFIX]['action'])) {
        return $fields[self::PREFIX]['action'];
      }
    }
    return NULL;
  }
561439
public function SmallFieldHolder($properties = array())
    {
        $context = $this;

        if (count($properties)) {
            $context = $this->customise($properties);
        }

        return $context->renderWith($this->getSmallFieldHolderTemplates());
    }
190546
public function renderField($field)
    {
        $fieldType = str_slug($field['type']);
        $fieldKey = str_slug($field['key']);

        return view()->first([
            "agencms::fields.{$fieldKey}",
            "agencms::fields.type.{$fieldType}",
            'agencms::fields.default'
        ])->with(['field' => $field])->render();
    }
900576
public function render($view, array $vars = [])
    {
        if ($vars) {
            $this->vars = array_merge($this->vars, $vars);
        }

        $output = $this->includeView($view, $this->vars, $return_content = true);

        while ($this->block_stack) {
            $this->endBlock();
        }

        if (!$extend_view = $this->extend_view) {
            return $output;
        }

        $this->extend_view = null;

        return $this->render($extend_view);
    }
1030180
public function render(string $layout = null, array $context = [])
    {
        if (null === $layout) {
            $layout = 'default';
        }

        $grav = Grav::instance();

        $block = HtmlBlock::create();
        $block->disableCache();

        $output = $this->getTemplate($layout)->render(
            ['grav' => $grav, 'config' => $grav['config'], 'block' => $block, 'form' => $this, 'layout' => $layout] + $context
        );

        $block->setContent($output);

        return $block;
    }
657509
public function render($view, array $parameters = [], Response $response = null)
    {
        return $this->templating->renderResponse($view, $parameters, $response);
    }
952645
protected function getHeaderField(array $fields)
    {
        foreach ($fields as $field) {
            if ($this->isField($field) && $field->isHeader) {
                return $field;
            }
        }

        return null;
    }
90594
public function show(array $fields) 
	{
		$this->show = array();
		
		foreach($fields as $field) {
			$this->show[$field] = true;
		}
		
		return $this;
	}
162302
public function returnFormField($vars)
    {
        extract($vars);
        $ret = '';
        if (isset($mask)) $ret .= '{' . $mask . '}';
        if (isset($preHtml)) { $ret .= $preHtml; }
        if (isset($html)) {
            $ret .= $html;
        } elseif (isset($items)) {
            foreach ($items as $i) {
                $ret .= $this->returnFormField($i);
            }
        } elseif (isset($component)) {
            $view = new Kwf_Component_Renderer();
            $ret .= $view->renderComponent($component);
        }
        if (isset($postHtml)) { $ret .= $postHtml; }
        if (isset($mask)) $ret .= '{/' . $mask . '}';
        return $ret;
    }
122939
public function render($options = array())
    {
        $options = array_merge($this->defaultOptions, $options);
        return $this->view->make('shareable::twitter', array('options' => $options));
    }
87648
public function render($format = null) {
		// list has its own format
		if ($this->initiator_class == 'list') {
			$format = $this->values['__format'] ?? 'text/html';
		}
		if (!isset($format)) $format = $this->options['input']['__content_type'] ?? 'text/html';
		$content_types_model = new \Object\Form\Model\Content\Types();
		$content_types = $content_types_model->get();
		if (empty($content_types[$format])) $format = 'text/html';
		$model =  new $content_types[$format]['no_form_content_type_model']();
		// special mode for emails
		if ($this->initiator_class == 'email') {
			\HTML::setMode(true);
			$result = $model->render($this);
			\HTML::setMode(false);
			return $result;
		} else {
			return $model->render($this);
		}
	}