Devise\Pages\Fields\FieldManager::getFieldToUpdate PHP 메소드

getFieldToUpdate() 보호된 메소드

This function will get us our field
protected getFieldToUpdate ( integer $fieldId, $fieldInput, $pageInput ) : Field
$fieldId integer
리턴 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;
    }