Get image object form field with image array
@param string $sField
@param string $sFakeField
@return File[]|null
501493
protected function getUploadFileListField($sField, $sFakeField)
    {
        $arFileList = $this->getAttribute($sField);
        if (!empty($arFileList)) {
            return $arFileList;
        }

        $arFileList = [];

        $arCachedFileList = (array) $this->getAttribute($sFakeField);
        foreach ($arCachedFileList as $arFileData) {
            $obFile = $this->initUploadFileObject($arFileData);
            if (empty($obFile)) {
                continue;
            }

            $arFileList[] = $obFile;
        }

        $this->setAttribute($sField, $arFileList);

        return $arFileList;
    }
473606
public function getField($field)
    {
        $result = array_filter($this->getFields(), function($input) use ($field) {
            return $field === $input->getName();
        });

        return reset($result);
    }
859668
public function getFieldHistory(string $field) : Collection
    {
        return $this->revisions->map(function ($revision) use ($field) : ?array {
            if ($revision->old($field) == $revision->new($field)) {
                return null;
            }

            return [
                'created_at' => (string) $revision->created_at,
                'user_id' => $revision->executor->id ?? null,
                'user_email' => $revision->executor->email ?? null,
                'old' => $revision->old($field),
                'new' => $revision->new($field),
            ];
        })->filter()->values();
    }
767975
@Nullable
  public TemporaryUserDataObject getUploadedFile (@Nullable final String sFieldName)
  {
    if (StringHelper.hasNoText (sFieldName))
      return null;

    return m_aRWLock.readLocked ( () -> m_aMap.get (sFieldName));
  }
1321888
public Field[] getFields(Class clazz, String fieldname) {
	Struct fieldMap;
	Object o;
	synchronized (map) {
	    o = map.get(clazz);
	    if (o == null) {
		fieldMap = store(clazz);
	    }
	    else fieldMap = (Struct) o;
	}
	o = fieldMap.get(fieldname, null);
	if (o == null) return null;
	return (Field[]) o;

    }
7304
public function getHTMLFragments($gridField)
    {
        $button = GridField_FormAction::create(
            $gridField,
            'export',
            _t('SilverStripe\\Forms\\GridField\\GridField.CSVEXPORT', 'Export to CSV'),
            'export',
            null
        );
        $button->setAttribute('data-icon', 'download-csv');
        $button->addExtraClass('btn btn-secondary no-ajax font-icon-down-circled action_export action_batch_export');
        $button->setForm($gridField->getForm());

        return [
            $this->targetFragment => '<p class="grid-csv-button">' . $button->Field() . '</p>',
        ];
    }
819619
public function getDefinedUploadFields()
    {
        $fields = isset(static::$imageFields)
            ? static::$imageFields
            : $this->imagesFields;

        return array_merge($this->getDefinedFileFields(), $fields);
    }
643566
protected function getBlobFields(&$data,$field='') {
        if(!empty($this->blobFields)) {
            $pk =   $this->getPk();
            $id =   $data[$pk];
            if(empty($field)) {
                foreach ($this->blobFields as $field){
                    $identify   =   $this->name.'/'.$id.'_'.$field;
                    $data[$field]   =   F($identify);
                }
                return $data;
            }else{
                $identify   =   $this->name.'/'.$id.'_'.$field;
                return F($identify);
            }
        }
    }
693199
public function getCMSFields()
    {
        // Obtain Field Objects (from parent):
        
        $fields = parent::getCMSFields();
        
        // Insert Image Tab:
        
        $fields->insertAfter(
            Tab::create(
                'Image',
                $this->fieldLabel('Image')
            ),
            'Main'
        );
        
        // Create Image Fields:
        
        $fields->addFieldsToTab(
            'Root.Image',
            [
                FieldSection::create(
                    'LinkImage',
                    $this->fieldLabel('LinkImage'),
                    [
                        $image = UploadField::create(
                            'LinkImage',
                            $this->fieldLabel('LinkImageFile')
                        ),
                        ViewportsField::create(
                            'LinkImageWidth',
                            $this->fieldLabel('LinkImageWidth')
                        )->setUseTextInput(true),
                        ViewportsField::create(
                            'LinkImageHeight',
                            $this->fieldLabel('LinkImageHeight')
                        )->setUseTextInput(true),
                        CheckboxField::create(
                            'InlineVector',
                            $this->fieldLabel('InlineVector')
                        )
                    ]
                )
            ]
        );
        
        // Define Image Field:
        
        $image->setAllowedExtensions(['gif', 'jpg', 'jpeg', 'png', 'svg']);
        $image->setFolderName($this->getAssetFolder());
        
        // Answer Field Objects:
        
        return $fields;
    }
1045057
protected function _getObjectField($sId, $sObject, $sField)
    {
        if (!$sId) {
            return '';
        }
        $oObj = oxNew($sObject);
        if ($oObj->load($sId)) {
            return $oObj->$sField->value;
        }

        return '';
    }
1143073
public function getFieldValue($field, $data = null)
    {
        if ($data !== null && isset($data[$field])) {
            return $data[$field];
        }
        if (isset($this->{$field})) {
            return $this->{$field};
        }
        return null;
    }
294401
protected function getFileSnippet(array $fields, $requestName = '$this')
    {
        $code = '';
        $template = <<<EOF
        if (%s->has('custom_delete_%s')) {
            \$data['%s'] = %s;
        }
        if (%s->hasFile('%s')) {
            \$data['%s'] = \$this->moveFile(%s->file('%s'));
        }

EOF;

        foreach ($fields as $field) {
            if ($field->isFile()) {
                $code .= sprintf($template,
                    $requestName,
                    $field->name,
                    $field->name,
                    $field->isNullable() ? 'null' : "''",
                    $requestName,
                    $field->name,
                    $field->name,
                    $requestName,
                    $field->name);
            }
        }

        return $code;
    }
540510
public static function getField($field)
    {
        return isset(self::$fields[$field]) ? self::$fields[$field] : null;
    }
870222
public function imageUrl($field = null)
    {
        $this->uploadFieldName = $this->getUploadFieldName($field);
        $this->uploadFieldOptions = $this->getUploadFieldOptions($this->uploadFieldName);

        // get the model attribute value
        $attributeValue = $this->getOriginal($this->uploadFieldName);

        // check for placeholder defined in option
        $placeholderImage = array_get($this->uploadFieldOptions, 'placeholder');

        return (empty($attributeValue) && $placeholderImage)
            ? $placeholderImage
            : $this->getStorageDisk()->url($attributeValue);
    }
490721
public function getDefaultFileRelationName($gridField)
    {
        $recordClass = $this->getRecordClassName($gridField);
        $hasOneFields = Config::inst()->get($recordClass, 'has_one');

        $imageField = null;
        foreach ($hasOneFields as $field => $type) {
            if ($type === 'SilverStripe\\Assets\\Image'
                ||  $type === 'SilverStripe\\Assets\\File'
                || is_subclass_of($type, 'SilverStripe\\Assets\\File')
            ) {
                $imageField = $field;
                break;
            }
        }

        return $imageField;
    }
1028485
public function getValue($field) {
        if (is_array($this->values)) {
            return isset($this->values[$field]) ? $this->values[$field] : null;
        }
        if (is_object($this->values)) {
            return $this->values->$field;
        }
        return null;
    }
510033
protected function GetMessageForField($sFieldName, $aFieldMessages)
    {
        $sMessage = '';
        if (is_array($aFieldMessages) && isset($aFieldMessages[$sFieldName])) {
            $sMessage = $aFieldMessages[$sFieldName];
        }

        return $sMessage;
    }