public function SocialDrupalContext::iEnableNicknameField in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iEnableNicknameField()
- 8.5 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iEnableNicknameField()
- 8.6 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iEnableNicknameField()
- 8.7 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iEnableNicknameField()
- 8.8 tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iEnableNicknameField()
- 10.3.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iEnableNicknameField()
- 10.0.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iEnableNicknameField()
- 10.1.x tests/behat/features/bootstrap/SocialDrupalContext.php \Drupal\social\Behat\SocialDrupalContext::iEnableNicknameField()
I enable the nickname field on profiles
@When /^(?:|I )enable the nickname field on profiles/
File
- tests/
behat/ features/ bootstrap/ SocialDrupalContext.php, line 365
Class
- SocialDrupalContext
- Provides pre-built step definitions for interacting with Open Social.
Namespace
Drupal\social\BehatCode
public function iEnableNicknameField() {
if (!\Drupal::service('module_handler')
->moduleExists("social_profile_fields")) {
throw new \Exception("Could not enable nickname field for profile because the Social Profile Fields module is disabled.");
}
\Drupal::configFactory()
->getEditable('social_profile_fields.settings')
->set("profile_profile_field_profile_nick_name", TRUE)
->save();
}