Devise\Pages\Fields\FieldManager::getFieldToUpdate PHP Method

getFieldToUpdate() protected method

This function will get us our field
protected getFieldToUpdate ( integer $fieldId, $fieldInput, $pageInput ) : Field
$fieldId integer
return Field
    protected function getFieldToUpdate($fieldId, $fieldInput, $pageInput)
    {
        $scope = array_get($fieldInput, 'scope');
        $newScope = array_get($fieldInput, 'new_scope', $scope);
        $field = $scope == 'global' ? $this->GlobalField->whereId($fieldId)->firstOrFail() : $this->Field->whereId($fieldId)->firstOrFail();
        if ($newScope !== $scope) {
            $field = $this->changeFieldScope($field, $newScope, $fieldInput, $pageInput);
        }
        return $field;
    }