Возвращает поле данного типа материалов

@param string $fieldName имя поля
@return ObjectField
966448
public function getField($fieldName) {
        $fields = $this->_get_fields();
        if (isset($fields[$fieldName])) {
            return  $fields[$fieldName];
        } else {
            throw new \Exception('Поле "'.$fieldName.'" не найдено');
        }
    }
564907
public function name($fieldName)
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");
        } else {
            //====================================================================//
            // Update New Field structure
            $this->new->name = $fieldName;
            if (empty($this->new->desc)) {
                $this->description($fieldName);
            }
        }

        return $this;
    }
576535
public function setField($fieldName, $val)
    {
        $this->objCacheClear();
        //if it's a has_one component, destroy the cache
        if (substr($fieldName, -2) == 'ID') {
            unset($this->components[substr($fieldName, 0, -2)]);
        }

        // If we've just lazy-loaded the column, then we need to populate the $original array
        if (isset($this->record[$fieldName . '_Lazy'])) {
            $tableClass = $this->record[$fieldName . '_Lazy'];
            $this->loadLazyFields($tableClass);
        }

        // Support component assignent via field setter
        $schema = static::getSchema();
        if ($schema->unaryComponent(static::class, $fieldName)) {
            unset($this->components[$fieldName]);
            // Assign component directly
            if (is_null($val) || $val instanceof DataObject) {
                return $this->setComponent($fieldName, $val);
            }
            // Assign by ID instead of object
            if (is_numeric($val)) {
                $fieldName .= 'ID';
            }
        }

        // Situation 1: Passing an DBField
        if ($val instanceof DBField) {
            $val->setName($fieldName);
            $val->saveInto($this);

            // Situation 1a: Composite fields should remain bound in case they are
            // later referenced to update the parent dataobject
            if ($val instanceof DBComposite) {
                $val->bindTo($this);
                $this->record[$fieldName] = $val;
            }
        // Situation 2: Passing a literal or non-DBField object
        } else {
            // If this is a proper database field, we shouldn't be getting non-DBField objects
            if (is_object($val) && $schema->fieldSpec(static::class, $fieldName)) {
                throw new InvalidArgumentException('DataObject::setField: passed an object that is not a DBField');
            }

            if (!empty($val) && !is_scalar($val)) {
                $dbField = $this->dbObject($fieldName);
                if ($dbField && $dbField->scalarValueOnly()) {
                    throw new InvalidArgumentException(
                        sprintf(
                            'DataObject::setField: %s only accepts scalars',
                            $fieldName
                        )
                    );
                }
            }

            // if a field is not existing or has strictly changed
            if (!array_key_exists($fieldName, $this->original) || $this->original[$fieldName] !== $val) {
                // TODO Add check for php-level defaults which are not set in the db
                // TODO Add check for hidden input-fields (readonly) which are not set in the db
                // At the very least, the type has changed
                $this->changed[$fieldName] = self::CHANGE_STRICT;

                if ((!array_key_exists($fieldName, $this->original) && $val)
                    || (array_key_exists($fieldName, $this->original) && $this->original[$fieldName] != $val)
                ) {
                    // Value has changed as well, not just the type
                    $this->changed[$fieldName] = self::CHANGE_VALUE;
                }
            // Value has been restored to its original, remove any record of the change
            } elseif (isset($this->changed[$fieldName])) {
                unset($this->changed[$fieldName]);
            }

            // Value is saved regardless, since the change detection relates to the last write
            $this->record[$fieldName] = $val;
        }
        return $this;
    }
990818
private function getObjectId($fieldName, $objectName = "object")
    {
        //====================================================================//
        // Load Pointed Object
        $object = $this->{$objectName}->{ "get".$fieldName}();
        //====================================================================//
        // Check Pointed Object Exists & Has an Id
        if (!$object || !method_exists($object, "getId") || !$object->getId()) {
            return null;
        }
        //====================================================================//
        // Return Object Id
        return (string) $object->getId();
    }
53219
protected function getGenericObject($fieldName, $objectType, $objectName = "object")
    {
        //====================================================================//
        // Load Pointed Object Id
        $objectId = $this->getObjectId($fieldName, $objectName);
        //====================================================================//
        // Push Object Id to Buffer
        $this->out[$fieldName] = $objectId
                ? self::objects()->encode($objectType, $objectId)
                : null;

        return $this;
    }
325089
public function getFieldsByView($objectName, $viewName)
    {
        $fieldConfigurations = array();

        $viewConfiguration = $this->getViewConfiguration($objectName, $viewName);
        if (is_array($viewConfiguration)) {
            $fieldConfigurations = $viewConfiguration["fields"];
            foreach ($fieldConfigurations as $i => $fieldConfiguration) {
                $fieldConfigurations[$i] = array_replace_recursive($this->defaultFieldConfiguration, $fieldConfiguration);
            }
        }
        usort($fieldConfigurations, array($this, 'sortByLocation'));

        return $fieldConfigurations;
    }
139445
public function findFieldResult(string $fieldName): ValidationResult
    {
        if (!array_key_exists($fieldName, $this->fieldResults)) {
            throw new FieldDoesNotExist(
                'Field does not exist: ' . $fieldName
            );
        }

        return $this->fieldResults[$fieldName];
    }
192664
protected function prefixFieldName($fieldName)
    {
        if ($fieldName === null || $fieldName === '') {
            return '';
        }
        if (!$this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')) {
            return $fieldName;
        }
        $fieldNamePrefix = (string)$this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix');
        if ($fieldNamePrefix === '') {
            return $fieldName;
        }
        $fieldNameSegments = explode('[', $fieldName, 2);
        $fieldName = $fieldNamePrefix . '[' . $fieldNameSegments[0] . ']';
        if (count($fieldNameSegments) > 1) {
            $fieldName .= '[' . $fieldNameSegments[1];
        }
        return $fieldName;
    }
1211389
function field($fieldName) {
        if ($fieldName) {
            if ($this->fields && $this->fields != '*') {
                if ($fieldName == 'SQL_CALC_FOUND_ROWS *') {
                    $this->fields = 'SQL_CALC_FOUND_ROWS' . " $this->fields";
                }
                else if ($fieldName != '*') {
                    $this->fields = $fieldName . ",$this->fields";
                }
                //else {
                //    $this->fields .= ',' . $fieldName;
                //}
            }
            else {
                $this->fields = $fieldName;
            }
        }
        return $this;
    }
207549
public function addField(Field $field)
    {
        if (!isset($this->attachment['fields'])) {
            $this->attachment['fields'] = [];
        }

        $this->attachment['fields'][] = $field;

        return $this;
    }
899254
protected function getSimple($fieldName, $objectName = "object", $default = null)
    {
        if (isset($this->{$objectName}->{$fieldName})) {
            $this->out[$fieldName] = trim($this->{$objectName}->{$fieldName});
        } else {
            $this->out[$fieldName] = $default;
        }

        return $this;
    }
894486
public function getFieldMapping($fieldName)
    {
        if (!$this->hasField($fieldName)) {
            throw MappingException::fieldNotFound($this->name, $fieldName);
        }

        return $this->mappings[$fieldName];
    }
335226
public function readRef($fieldName)
    {
        $oRef = $this->readNestedAttribute($fieldName);
        if (!\MongoDBRef::isRef($oRef)) {
            throw new InvalidReferenceException();
        }
        if (isset($this->dbRefs) && isset($this->dbRefs[$fieldName])) {
            $modelInstance = $this->instantiateModel($this->dbRefs[$fieldName]);
        } else if ($this->getDI()->has('mongoMapper')) {
            $modelInstance = $this->getDI()->get('mongoMapper')->resolveModel($oRef['$ref']);
        } else {
            return $oRef;
        }
        return forward_static_call(array($modelInstance, 'findById'), $oRef['$id']);
    }
927365
public function getFieldLabel($fieldName)
    {
        $result = $this->getField($fieldName, 'label_'.$this->locale, $this->getField($fieldName, 'label'));

        if ($result === null && array_key_exists($fieldName, $this->standardFieldLabels)) {
            $result = $this->standardFieldLabels[$fieldName];
        }

        if ($result === null) {
            $result = $fieldName;
        }

        return $result;
    }
804550
public function getSetter($fieldName)
    {
        if ($this->hasField($fieldName) === false) {
            return false;
        }

        return $this->mapping[$fieldName]['setter'];
    }
100809
protected function initializeField($field)
    {
        $field->setParentContext($this);
        $this->getFieldManager()->pushField($field);
        return $field;
    }
692333
public Field getField(String fieldName) {
		final PropDesc desc = this.propMap.get(fieldName);
		return null == desc ? null : desc.getField();
	}