protected function changeFieldScope($field, $newScope, $fieldInput, $pageInput) { if ($newScope == 'global') { $field->delete(); // delete the page field so the global field can take over return $this->changeToGlobalField($fieldInput, $pageInput); } return $this->changeToPageField($fieldInput, $pageInput); }