@param \Interpro\Core\Contracts\Ref\ARef $ref
@param string $field_name

@return \Interpro\Extractor\Contracts\Items\COwnItem
969027
public function getItem(ARef $ref, $field_name)
    {
        $ownerType = $ref->getType();
        $type_name = $ownerType->getName();
        $key = $field_name.'_'.$ref->getId();

        if(!array_key_exists($type_name, $this->items))
        {
            $this->items[$type_name] = [];
        }

        if(!array_key_exists($key, $this->items[$type_name]))
        {
            $fieldType = $ownerType->getFieldType($field_name);

            return $this->getCap($fieldType);
        }

        return $this->items[$type_name][$key];
    }
202862
public function getFieldTypeFor($name, $column, $field = null)
    {
        $type = null;
        if ($column instanceof Column) {
            if ($column->getType()) {
                $type = get_class($column->getType());
            }
            $column = $column->getName();
        }
        if ($field !== null) {
            if (isset($this->contenttypes[$name]) && isset($this->contenttypes[$name]['fields'][$column]['fields'][$field])) {
                $type = $this->contenttypes[$name]['fields'][$column]['fields'][$field]['type'];
            }
        } elseif (isset($this->contenttypes[$name]) && isset($this->contenttypes[$name]['fields'][$column])) {
            $type = $this->contenttypes[$name]['fields'][$column]['type'];
        }

        if ($column === 'slug') {
            $type = 'slug';
        }

        if ($type === 'select' && isset($this->contenttypes[$name]['fields'][$column]['multiple']) && $this->contenttypes[$name]['fields'][$column]['multiple'] === true) {
            $type = 'selectmultiple';
        }

        if ($type && isset($this->typemap[$type])) {
            $type = $this->typemap[$type];
        } else {
            $type = $this->typemap['text'];
        }

        return $type;
    }
165133
public function mapBasicField(array &$values, $field_name) {
    $item = $this->item;
    if (!empty($item[$field_name])) {
      $values[$field_name] = $item[$field_name];
    }
  }
761208
public function create(ARef $ref)
    {
        //Скопировано c QS
        $type = $ref->getType();

        $fields  = $this->collectionFactory->createFieldsCollection();
        $owns    = $this->collectionFactory->createOwnsCollection();
        $refs    = $this->collectionFactory->createRefsCollection();
        $subVars = $this->collectionFactory->createSubVarCollection($ref);

        if($type->getRank() === TypeRank::BLOCK)
        {
            $item = new BlockItem($ref, $fields, $owns, $refs, $subVars);
        }
        elseif($type->getRank() === TypeRank::GROUP)
        {
            $item = new GroupItem($ref, $fields, $owns, $refs, $subVars);
        }
        else
        {
            throw new FeedbackException('При создании элемента передан тип с рангом отличным от блока и группы: '.$type->getRank().'!');
        }

        return $item;
    }
853610
protected function formField ($name, $def = null)
  {
    return Http::field ($this->request, $name, $def);
  }
147709
public static function get(string $name, string $key, string $field = null)
    {
        return static::getInstance($name)->get($key, $field);
    }
497192
public function field($field_name, array $attributes = array())
    {
        if (isset($this->fields[$field_name])) {
            $field = $this->fields[$field_name];
            if (count($attributes)) {
                $field->attributes($attributes);
                $field->build();
            }

            return $field;
        }
    }
81687
public function getFieldValue(string $field_name)
    {
        try {
            $value = null;
            $fields = $this->stmt->fetch(\PDO::FETCH_ASSOC);
            if (array_key_exists($field_name, $fields)) {
                $value = $fields[$field_name];
            } else {
                throw new \Exception("Field '$field_name' is not present in the current result set.\n");
            }
            return $value;
        } catch (\PDOException $e) {
            die('Error: ' . $e->getMessage());
        } catch (\Exception $e) {
            die("Error: " . $e->getMessage());
        }
    }
968504
public function getCollectionSet($ref_name)
    {
        if(!in_array($ref_name, $this->item_names))
        {
            $this->notFoundAction($ref_name);
        }

        if(!array_key_exists($ref_name, $this->items))
        {
            $this->items[$ref_name] = $this->collectionFactory->createCollectionSet($this->ref, $ref_name);
        }

        return $this->items[$ref_name];
    }
590750
public function importField($field, $field_name = null)
    {
        $field = $this->model->hasElement($field);
        /** @type \atk4\data\Field $field */

        if (!$field || !$field->isEditable() || $field->isHidden()) {
            return;
        }

        if ($field_name === null) {
            $field_name = $this->_unique($this->owner->elements, $field->short_name);
        }
        $this->field_associations[$field_name] = $field;

        $field_type = $this->getFieldType($field);
        $field_caption = isset($field->ui['caption']) ? $field->ui['caption'] : null;

        // add form field
        $form_field = $this->owner->addField($field_type, $field_name, $field_caption);
        $form_field->set($field->get());

        // set model for hasOne field
        if ($ref_field = $this->model->hasRef($field->short_name)) {
            $form_field->setModel($ref_field->getModel());
        }

        // set model for enum field
        if (isset($field->enum)) {

            $list = isset($field->ui['valueList'])
                ? $field->ui['valueList']
                : array_combine($field->enum, $field->enum);

            if ($form_field instanceof Form_Field_Checkbox) {
                $list = array_reverse($list);
            }


            $form_field->setValueList($list);
        }

        // field value is mandatory
        if ($field->mandatory) {
            $form_field->validateNotNULL($field->mandatory);
        }

        // form field placeholder
        $placeholder = isset($field->ui['placeholder']) ? $field->ui['placeholder'] : /*$field->emptyText() ?:*/ null;
        if ($placeholder) {
            $form_field->setAttr('placeholder', $placeholder);
        }

        // form field hint
        if (isset($field->ui['hint'])) {
            $form_field->setFieldHint($field->ui['hint']);
        }

        // set empty text option for dropdown type form fields if model field is not mandatory
        if ($form_field instanceof Form_Field_ValueList && !$field->mandatory) {
            /** @type string $text */
            //$text = $field->emptyText();
            //$form_field->setEmptyText($text);
            $form_field->setEmptyText('- no value -');
        }

        return $form_field;
    }
500404
public static function updateField($field_name)
    {
        $irregular = [
            'get_started' => 'get_started_button_payload',
            'greeting'    => 'greeting_text'
        ];
        
        if ( ! isset($irregular[$field_name])) {
            $field_value = Instance::get($field_name);
        } else {
            $field_value = Instance::get($irregular[$field_name]);
        }
    
        $resource = self::getResourceUrl();
    
        if ( ! empty($field_value) && ! is_null($field_value)) {
            
            $data = [
                $field_name => $field_value
            ];
    
            if ($field_name === 'get_started') {
                $data = [
                    'get_started' => [
                        'payload' => $field_value,
                    ],
                ];
            }
    
            return Request::send($resource, $data);
        }
    
        return self::deleteFields($field_name);
    }
950344
public function eq($field_path, $value, $or_union_name = null)
    {
        $newUnit = new SpecificationEq($this->type, $field_path, $value);
        $this->specificationSet->addUnit($newUnit, $or_union_name);

        return $this;
    }
1371314
private function useShortGetterName($field_name)
    {
        return substr($field_name, 0, 3) === 'is_' || in_array(substr($field_name, 0, 4), ['has_', 'had_', 'was_']) || in_array(substr($field_name, 0, 5), ['were_', 'have_']);
    }
592137
public static Object getValueOfField(Field field, Object ref) {
		field.setAccessible(true);
		Object value = null;
		try {
			value = field.get(ref);
		} catch (IllegalArgumentException e) {
		} catch (IllegalAccessException e) {
		}
		return value;
	}
302960
public function getGlobalParamGet(string $field_name, int $field_type) {
        try {
            $param = Get::getInstance()->getCleanedField($field_name, $field_type);
        } catch (\RuntimeException $e) {
            \trigger_error($e->getMessage());

            $param = null;
        }

        return $param;
    }
411792
public function refSQL($name, $load = null)
    {
        /** @type Field_Reference $ref */
        $ref = $this->getElement($name);

        return $ref->refSQL($load);
    }
1292091
public function hasField($name)
    {
        if ($name instanceof Field) {
            return $name;
        }

        $f_object = $this->hasElement($name);
        if (!$f_object || !$f_object instanceof Field) {
            return false;
        }

        return $f_object;
    }