Returns array of data types for select inputs
@return array
192676
public static function dataTypeSelectOptions()
    {
        return [
            Property::DATA_TYPE_STRING => Module::t('app', 'String'),
            Property::DATA_TYPE_TEXT => Module::t('app', 'Text'),
            Property::DATA_TYPE_INTEGER => Module::t('app', 'Integer'),
            Property::DATA_TYPE_FLOAT => Module::t('app', 'Float'),
            Property::DATA_TYPE_BOOLEAN => Module::t('app', 'Boolean'),
            Property::DATA_TYPE_PACKED_JSON => Module::t('app', 'Packed JSON'),
            Property::DATA_TYPE_INVARIANT_STRING => Module::t('app', 'Untranslatable String'),
        ];
    }
1276966
public function data() : array
    {
        $data = array();

        $data['classes'] = implode(' ', apply_filters('Modularity/Module/Classes', array('box', 'box-index'), $this->post_type, $this->args));

        // Get column classes
        $data['columnClass'] = 'grid-md-6';
        if (!empty(get_field('index_columns', $this->ID))) {
            $data['columnClass'] = get_field('index_columns', $this->ID);
        }

        $data['imageDimension'] = $this->getImageDimension($data['columnClass']);

        // Get the index items
        $data['items'] = $this->prepareItems(get_field('index', $this->ID));

        return $data;
    }
404253
public function getColumns(): array
    {
        $tSelects = isset($this->statements['selects']) === true ? $this->statements['selects'] : [];
        $tColumns = [];
        foreach ($tSelects as $key => $value) {
            if (\is_string($value)) {
                if (\is_int($key)) {
                    $tElements = explode('.', $value);
                    if (!\in_array('*', $tElements, true)) {
                        $tColumns[$tElements[1] ?? $tElements[0]] = $value;
                    }
                } elseif (\is_string($key)) {
                    $tColumns[$value] = $key;
                }
            }
        }
        return $tColumns;
    }
171543
protected function getSelectionTypes()
    {
        if (!count($this->usedFields)) {
            return array_keys($this->types);
        }
        $fields = array_keys($this->usedFields);

        if (!count($this->types)) {
            $types = $this->metadata->getTypesByFields($fields);
            if (!count($types)) {
                throw new InvalidArgumentException($this->translate(
                    'The selection is not possible. Conditions do not match metadata types.'
                ));
            }
            if (!count(array_diff($this->metadata->getTypesList(), $types))) {
                $types = [];
            }

            return $types;
        }

        $types = array_keys($this->types);
        $typesCount = count($types);
        if (count(array_intersect($this->metadata->getTypesByFields($fields), $types)) != $typesCount) {
            throw new InvalidArgumentException($this->translate(
                'The selection is not possible. Conditions do not match metadata types.'
            ));
        }

        return $types;
    }
925600
protected function getTypes()
    {
        return array(
            self::CLASS_NAME,
            self::CSS_SELECTOR,
            self::ID,
            self::NAME,
            self::LINK_TEXT,
            self::PARTIAL_LINK_TEXT,
            self::TAG_NAME,
            self::XPATH
        );
    }
720915
private function getColumnTypes(): void
  {
    $rows = DataLayer::getAllTableColumns();
    foreach ($rows as $row)
    {
      $key = '@'.$row['table_name'].'.'.$row['column_name'].'%type@';
      $key = strtoupper($key);

      $value = $row['column_type'];
      if (isset($row['character_set_name'])) $value .= ' character set '.$row['character_set_name'];

      $this->replacePairs[$key] = $value;
    }

    $this->io->text(sprintf('Selected %d column types for substitution', sizeof($rows)));
  }
1225536
public function getTypes()
    {
        $types = $this->config()->get('types');

        if ($this->allowed_types) {
            // Prioritise local field over global settings
            $allowed_types = $this->allowed_types;
        }
        if ($allowed_types = $this->config()->get('allowed_types')) {
           foreach ($allowed_types as $type) {
                if (!array_key_exists($type, $types)) {
                    user_error("{$type} is not a valid link type");
                }
            }

            foreach (array_diff_key($types, array_flip($allowed_types)) as $key => $value) {
                unset($types[$key]);
            }
        }
        $this->extend('updateTypes', $types);
        return $types;
    }
780099
protected function getInput()
	{
		// Initialize some field attributes.
		$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
		$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
		$columns = $this->element['cols'] ? ' cols="' . (int) $this->element['cols'] . '"' : '';
		$rows = $this->element['rows'] ? ' rows="' . (int) $this->element['rows'] . '"' : '';

		// Initialize JavaScript field attributes.
		$onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';

		return '<textarea name="' . $this->name . '" id="' . $this->id . '"' . $columns . $rows . $class . $disabled . $onchange . '>'
			. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '</textarea>';
	}
150394
public function data() : array
    {

        //Get data
        $data = get_fields($this->ID);
        $data['args'] = $this->args;

        //Do not use link
        if ($data['mod_image_link'] == "false") {
            $data['mod_image_link_url'] = "";
        }

        //Set image class
        $imgClasses = array();
        if ($data['mod_image_responsive'] === true) {
            $imgClasses[] = 'image-responsive';
        }
        $data['img_classes'] = implode(' ', $imgClasses);

        //Crop image (if non existing)
        $data['img_src'] = $this->maybeCropImage($data);

        //Add box classes
        $data['classes'] = implode(' ', apply_filters('Modularity/Module/Classes', array('box', 'box-filled'), $this->post_type, $this->args));

        return $data;
    }
1005277
private function getFieldTypeChoices()
    {
        $choices = [];
        foreach ($this->fieldTypeCollectionFactory->getConcreteFieldTypesIdentifiers() as $fieldTypeIdentifier) {
            $choices[$this->getFieldTypeLabel($fieldTypeIdentifier)] = $fieldTypeIdentifier;
        }

        ksort($choices, SORT_NATURAL);

        return $choices;
    }
802599
public static function getTypes()
    {
        $typesList = [];
        foreach (Yii::$app->db->getTableSchema(static::tableName())->columns['type']->enumValues as $type) {
            $typesList[$type] = MeasureHelper::t($type);
        }
        return $typesList;
    }
112273
public function getTypes()
    {
        return array_reduce(
            $this->_models,
            function ($result, $item) {
                $result[$item['type']] = $item['type'];
                return $result;
            },
            []
        );
    }
854957
protected function getOptions()
	{
		$options = array();

		$select = new HtmlSelect;

		// Try to inject the text object into the field
		try
		{
			$select->setText($this->getText());
		}
		catch (\RuntimeException $exception)
		{
			// A Text object was not set, ignore the error and try to continue processing
		}

		/** @var \SimpleXMLElement $option */
		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			// Create a new option object based on the <option /> element.
			$tmp = $select->option(
				(string) $option['value'], trim((string) $option), 'value', 'text', ((string) $option['disabled'] == 'true')
			);

			// Set some option attributes.
			$tmp->class = (string) $option['class'];

			// Set some JavaScript option attributes.
			$tmp->onclick = (string) $option['onclick'];

			// Add the option object to the result set.
			$options[] = $tmp;
		}

		reset($options);

		return $options;
	}
674544
protected function getInput()
	{
		$html = array();
		$attr = '';

		// Initialize some field attributes.
		$attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
		$attr .= ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
		$attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
		$attr .= $this->multiple ? ' multiple="multiple"' : '';

		// Initialize JavaScript field attributes.
		$attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';

		// Get the field groups.
		$groups = (array) $this->getGroups();

		// Create a read-only list (no name) with a hidden input to store the value.
		if ((string) $this->element['readonly'] == 'true')
		{
			$html[] = HtmlSelect::groupedlist(
				$groups,
				null,
				array(
					'list.attr' => $attr, 'id' => $this->id, 'list.select' => $this->value, 'group.items' => null, 'option.key.toHtml' => false,
					'option.text.toHtml' => false
				)
			);
			$html[] = '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '"/>';
		}
		else
		// Create a regular list.
		{
			$html[] = HtmlSelect::groupedlist(
				$groups,
				$this->name,
				array(
					'list.attr' => $attr, 'id' => $this->id, 'list.select' => $this->value, 'group.items' => null, 'option.key.toHtml' => false,
					'option.text.toHtml' => false
				)
			);
		}

		return implode($html);
	}
209857
public function getFieldTypes()
    {
        $output = array(
            'activity'    => $this->_('Activity'),
            'appointment' => $this->_('Appointment'),
            'boolean'     => $this->_('Boolean'),
            'caretaker'   => $this->_('Caretaker'),
            'consent'     => $this->_('Consent'),
            'date'        => $this->_('Date'),
            'text'        => $this->_('Free text'),
            'textarea'    => $this->_('Long free text'),
            'location'    => $this->_('Location'),
            'datetime'    => $this->_('Moment in time'),
            'procedure'   => $this->_('Procedure'),
            'relation'    => $this->_('Relation'),
            'select'      => $this->_('Select one'),
            'multiselect' => $this->_('Select multiple'),
            'track'       => $this->_('Track'),
            );

        asort($output);
        return $output;
    }
533154
public function getDefaultOperatorInputByType()
    {
        if (null === $this->_defaultOperatorInputByType) {
            $this->_defaultOperatorInputByType = [
                'string'      => ['{}', '!{}'],
                'numeric'     => ['==', '!=', '>=', '>', '<=', '<'],
                'date'        => ['==', '>=', '>', '<=', '<'],
                'select'      => ['==', '!='],
                'boolean'     => ['==', '!='],
                'multiselect' => ['()', '!()'],
                'grid'        => ['()', '!()'],
                'category'    => ['()', '!()'],
            ];
            $this->_arrayInputTypes            = ['multiselect', 'grid', 'category'];
        }

        return $this->_defaultOperatorInputByType;
    }
830833
public static function getValues(): array
    {
        $values = [];
        foreach (self::TYPES as $type) {
            $values[$type] = self::getValue($type);
        }

        return $values;
    }