Renders the field passed in to the $field parameter. Will look for key specific templates,
then type specific templates and finally render using the default template.

@param Array|Illuminate\Support\Collection $repeaters
@return string
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();
    }
748848
protected function markup(array $field)
    {
        $attributes = $field['attributes'];
        $attributes = $this->addAttribute($attributes, 'id', $field['id']);
        $attributes = $this->addAttribute($attributes, 'name', $field['name']);
        $output = '';
        $output .= $this->getWrapper('markup', $attributes);
        $output .= $field['value'];
        $output .= $this->getWrapperEnd('markup');
        return $output;
    }
64486
protected function _render_one_field($field, $options)
    {
        $name = $options['name'] ?? $field;
        $type = $this->getSQLFieldType($options['type'] ?? null, $options);

        return $this->_escape($name).' '.$type;
    }
1207088
public function render(array $templates, Fluent $field): string
    {
        $method = $field->get('method');
        $template = $templates[$method] ?? [$this->presenter, $method];

        if (! \is_callable($template)) {
            throw new InvalidArgumentException("Form template for [{$method}] is not available.");
        }

        return $template($field);
    }
975119
private function render(Field $field)
    {
        $field->set('lang', $this->language);
        $field->set('prefix', $this->buildPrefix($field));

        foreach ($this->fill($field->getAttributes()) as $key => $value) {
            $field->set($key, $value);
        }

        return $field->render();
    }
486851
public function get_field_raw( $field ) {
		if ( array_key_exists( $field, $this->prop( 'fields' ) ) ) {
			return $this->prop( 'fields' )[ $field ];
		}

		return null;
	}
750599
public function FieldHolder($properties = array())
    {
        $context = $this;

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

        return $context->renderWith($this->getTemplates());
    }
1272327
protected function render_field_data(\core_customfield\output\field_data $field) {
        $context = $field->export_for_template($this);
        return $this->render_from_template('core_customfield/field_data', $context);
    }
356625
protected function load($field)
    {
        if (!is_null($this->$field)
            || !$this->delegatesCollection
            || !$this->delegatesCollection->containsKey($key = strtolower($field))
        ) {
            return $this->$field;
        }

        $loader = $this->delegatesCollection->get($key);
        $this->delegatesCollection->remove($key);

        return $this->$field = $loader($this);
    }
1310812
private function parseFieldRepeaters(array $fields, $key)
    {
        $blacklist = ['repeater', 'slug', 'templatefield'];
        $repeater = $fields[$key];

        if (!isset($repeater['fields']) || !is_array($repeater['fields'])) {
            return;
        }

        foreach ($repeater['fields'] as $repeaterKey => $repeaterField) {
            if (!isset($repeaterField['type']) || in_array($repeaterField['type'], $blacklist)) {
                unset($repeater['fields'][$repeaterKey]);
            }
        }

        return $repeater;
    }
961686
function render_field_settings( $field )
	{
		/*
		*  acf_render_field_setting
		*
		*  This function will create a setting for your field. Simply pass the $field parameter and an array of field settings.
		*  The array of settings does not require a `value` or `prefix`; These settings are found from the $field array.
		*
		*  More than one setting can be added by copy/paste the above code.
		*  Please note that you must also have a matching $defaults value for the field name (font_size)
		*/
		
		acf_render_field_setting( $field, array(
			'label'			=> __('Live Preview','acf-font-awesome'),
			'instructions'	=> '',
			'type'			=> 'message',
			'name'			=> 'fa_live_preview',
			'class'			=> 'live-preview'
		));

		acf_render_field_setting( $field, array(
			'label'			=> __('Default Icon','acf-font-awesome'),
			'instructions'	=> '',
			'type'			=> 'select',
			'name'			=> 'default_value',
			'class'	  		=>  'fontawesome',
			'choices'		=>	$field['choices']
		));

		acf_render_field_setting( $field, array(
			'label'			=> __('Return Value','acf-font-awesome'),
			'instructions'	=> __('Specify the returned value on front end','acf-font-awesome'),
			'type'			=> 'radio',
			'name'			=> 'save_format',
			'choices'	=>	array(
				'element'	=>	__('Icon Element','acf-font-awesome'),
				'class'		=>	__('Icon Class','acf-font-awesome'),
				'unicode'	=>	__('Icon Unicode','acf-font-awesome'),
				'object'	=>	__('Icon Object','acf-font-awesome'),
			)
		));

		acf_render_field_setting( $field, array(
			'label'			=> __('Allow Null?','acf-font-awesome'),
			'instructions'	=> '',
			'type'			=> 'radio',
			'name'			=> 'allow_null',
			'choices'	=>	array(
				1	=>	__('Yes','acf-font-awesome'),
				0	=>	__('No','acf-font-awesome')
			)
		));

		acf_render_field_setting( $field, array(
			'label'			=> __('Enqueue FontAwesome?','acf-font-awesome'),
			'instructions'	=> __('Set to \'Yes\' to enqueue FA in the footer on any pages using this field.','acf-font-awesome'),
			'type'			=> 'radio',
			'name'			=> 'enqueue_fa',
			'choices'	=>	array(
				1	=>	__('Yes','acf-font-awesome'),
				0	=>	__('No','acf-font-awesome')
			)
		));
	}
1226284
public function map($field, $context = null)
    {
        foreach ($this->mappers as $mapper) {
            $field = $mapper->map($field, $context);
        }
        return $field;
    }
886345
protected function _field($field) {
		if (!isset($this->_config['fieldMap'][$field])) {
			throw new RuntimeException(__d('user_tools', 'Invalid field "%s"!', $field));
		}

		return $this->_config['fieldMap'][$field];
	}
274116
public function getField($field)
    {
        if (!$this->isFieldSupported($field)) {
            return null;
        }

        if (!$this->hasLoadedField($field)) {
            $loaderData = $this->getLoaderData($field);
            if ($normalizer = $this->normalizersMap->getNormalizerForField($field)) {
                switch ($normalizer[ 'type' ]) {
                    case NormalizersMap::TYPE_METHOD:
                        $this->fields[ $field ] =
                            $this->{sprintf('%sNormalizer', $normalizer[ 'method' ])}($loaderData);
                        break;

                    case NormalizersMap::TYPE_ARRAY_PATH:
                        $this->fields[ $field ] =
                            ArrayUtils::getNested($loaderData, $normalizer[ 'path' ], $normalizer[ 'defaultValue' ]);
                        break;

                    case NormalizersMap::TYPE_PREFILLED_VALUE:
                        $this->fields[ $field ] = $normalizer[ 'value' ];
                        break;

                    default:
                        throw new GenericException("Unknown normalizer type \"{$normalizer['type']}\"");
                }

                switch ($field) {
                    case self::FIELD_WEBSITES:
                    case self::FIELD_EXTRA:
                        if ($this->fields[ $field ]) {
                            $this->fields[ $field ] = (array) $this->fields[ $field ];
                        } else {
                            $this->fields[ $field ] = [];
                        }
                        break;
                }
            } // Don't need to be normalized
            else {
                $this->fields[ $field ] = $loaderData;
            }
        }

        return parent::getField($field);
    }
6774
protected function makeFields(Collection $fields = null)
    {
        if (is_null($fields))
        {
            return '';
        }

        $fields = $fields->pluck('name')->toArray();

        return count($fields) ? "'" . implode("', '", $fields) . "'" : '';
    }
1280540
public function render_field($field)
    {
        // convert value to array
        $field['value'] = acf_get_array($field['value'], false);

        // add empty value (allows '' to be selected)
        if (empty($field['value'])) {
            $field['value'][''] = '';
        }

        // placeholder
        if (empty($field['placeholder'])) {
            $field['placeholder'] = __("Select",'acf');
        }

        // vars
        $atts = array(
            'id'                => $field['id'],
            'class'             => $field['class'],
            'name'              => $field['name'],
            'data-multiple'     => $field['multiple'],
            'data-placeholder'  => $field['placeholder'],
            'data-allow_null'   => $field['allow_null']
        );

        // multiple
        if ($field['multiple']) {
            $atts['multiple'] = 'multiple';
            $atts['size'] = 5;
            $atts['name'] .= '[]';
        }

        // special atts
        foreach (array( 'readonly', 'disabled' ) as $k) {
            if (!empty($field[ $k ])) {
                $atts[ $k ] = $k;
            }
        }

        // vars
        $els = array();
        // $choices = array();

        $posttypes = $this->post_type_options();
        foreach ($posttypes as $pt) {
            $els[] = array(
                'type' => 'option',
                'value' => $pt['value'],
                'label' => $pt['label'],
                'selected' => in_array($pt['value'], $field['value'])
            );
        }

        // null
        if ($field['allow_null']) {
            array_unshift($els, array(
                'type' => 'option',
                'value' => '',
                'label' => '- ' . $field['placeholder'] . ' -'
            ));
        }

        // html
        echo '<select ' . acf_esc_attr($atts) . '>';

        // construct html
        if (!empty($els)) {
            foreach ($els as $el) {
                // extract type
                $type = acf_extract_var($el, 'type');
                if ($type == 'option') {
                    // get label
                    $label = acf_extract_var($el, 'label');
                    // validate selected
                    if (acf_extract_var($el, 'selected')) {
                        $el['selected'] = 'selected';
                    }

                    // echo
                    echo '<option ' . acf_esc_attr($el) . '>' . $label . '</option>';
                } else {
                    // echo
                    echo '<' . $type . ' ' . acf_esc_attr($el) . '>';
                }


            }

        }

        echo '</select>';
    }
1171554
public function form( $instance ) {
		$instance = shortcode_atts( $this->_defaults, $instance );
		foreach ( $instance as $key => $value ) {
			if ( is_array( $this->_defaults[ $key ] ) && isset( $this->_defaults[ $key ][0] ) && is_array( $this->_defaults[ $key ][0] ) ) {
				foreach ( array_keys( $value ) as $repeater_key ) {
					$instance[ $key ][ $repeater_key ] = shortcode_atts( $this->_defaults[ $key ][0], $instance[ $key ][ $repeater_key ] );
				}
				array_unshift( $instance[ $key ], $this->_defaults[ $key ][0] );
			}
		}
		$this->_render_form( $instance );
	}