protected function DemoUser::fillProfile in Open Social 8.2
Same name and namespace in other branches
- 8.9 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 8 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 8.3 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 8.4 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 8.5 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 8.6 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 8.7 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 8.8 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 10.3.x modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 10.0.x modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 10.1.x modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
- 10.2.x modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::fillProfile()
Fills the some fields of a profile.
Parameters
\Drupal\profile\Entity\ProfileInterface $profile: Type of ProfileInterface.
array $item: The profile field item.
1 call to DemoUser::fillProfile()
- DemoUser::createContent in modules/
custom/ social_demo/ src/ DemoUser.php - Creates content.
File
- modules/
custom/ social_demo/ src/ DemoUser.php, line 200
Class
- DemoUser
- Class DemoUser.
Namespace
Drupal\social_demoCode
protected function fillProfile(ProfileInterface $profile, array $item) {
$profile->field_profile_image = $item['image'];
$profile->field_profile_first_name = $item['first_name'];
$profile->field_profile_last_name = $item['last_name'];
$profile->field_profile_organization = $item['organization'];
$profile->field_profile_function = $item['function'];
$profile->field_profile_phone_number = $item['phone_number'];
$profile->field_profile_self_introduction = $item['self_introduction'];
$profile->field_profile_address = $item['address'];
$profile->field_profile_expertise = $item['expertise'];
$profile->field_profile_interests = $item['interests'];
}