public function getInputVars(\ElggEntity $entity) {
		$this->input_vars->entity = ($entity->guid) ? $entity : null;
		$this->input_vars->required = $this->isRequired();

		if (!empty($this->input_vars->options_values) && is_array($this->input_vars->options_values)) {
			$lang = get_language();
			$options_values = array();

			foreach ($this->input_vars->options_values as $o_key => $o_value) {
				if (is_array($o_value)) {
					$o_value = elgg_extract($lang, $o_value, elgg_echo(implode(':', array_filter(array(
						'option',
						$this->entity_type,
						$this->entity_subtype,
						$this->getShortname(),
						$o_key,
					)))));
				}
				$options_values[$o_key] = $o_value;
			}

			if ($this->type == 'checkboxes' || $this->type == 'radio') {
				$this->input_vars->options = array_flip($options_values);
			}
			$this->input_vars->options_values = $options_values;
		}

		$vars = (array) $this->input_vars;

		$clean = array('ui_sections', 'relationship', 'inverse_relationship', 'bilateral');
		foreach ($clean as $key) {
			unset($vars[$key]);
		}
		
		return elgg_trigger_plugin_hook('input_vars', 'prototyper', array(
			'field' => $this,
			'entity' => $entity,
				), $vars);
	}
public function getInputVars(\ElggEntity $entity) {
		$this->input_vars->entity = ($entity->guid) ? $entity : null;
		$this->input_vars->required = $this->isRequired();

		if (!empty($this->input_vars->options_values) && is_array($this->input_vars->options_values)) {
			$lang = get_language();
			$options_values = array();

			foreach ($this->input_vars->options_values as $o_key => $o_value) {
				if (is_array($o_value)) {
					$o_value = elgg_extract($lang, $o_value, elgg_echo(implode(':', array_filter(array(
						'option',
						$this->entity_type,
						$this->entity_subtype,
						$this->getShortname(),
						$o_key,
					)))));
				}
				$options_values[$o_key] = $o_value;
			}

			if ($this->type == 'checkboxes' || $this->type == 'radio') {
				$this->input_vars->options = array_flip($options_values);
			}
			$this->input_vars->options_values = $options_values;
		}

		$vars = (array) $this->input_vars;

		$clean = array('ui_sections', 'relationship', 'inverse_relationship', 'bilateral');
		foreach ($clean as $key) {
			unset($vars[$key]);
		}
		
		return elgg_trigger_plugin_hook('input_vars', 'prototyper', array(
			'field' => $this,
			'entity' => $entity,
				), $vars);
	}
{@inheritdoc}