/** * @return ProfileField[] */ public function getProfileFields() { if (!$this->profileFields) { $profileFieldData = $this->get('profile_fields'); $this->profileFields = []; foreach ($profileFieldData as $profileFieldId => $value) { if ($value !== '') { $this->profileFields[] = $this->profileFieldsRepository->find($profileFieldId); } } } return $this->profileFields; }
/** * @return ProfileField[] */ protected function getAllProfileFields() { return [$this->profileFieldRepository->find($this->get('profile_field_id'))]; }
/** * @param int $id * * @return \Illuminate\View\View */ public function editProfileFieldOptions($id) { $field = $this->profileFieldRepository->find($id); $options = $this->profilefieldOptionRepository->getForProfileField($field); return view('admin.users.profile_fields.edit_options', ['options' => $options, 'field' => $field])->withActive('profile-fields'); }