protected function PostForm::setFormMode in Open Social 8
Same name and namespace in other branches
- 8.9 modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 8.2 modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 8.3 modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 8.4 modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 8.5 modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 8.6 modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 8.7 modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 8.8 modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 10.3.x modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 10.0.x modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 10.1.x modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
- 10.2.x modules/social_features/social_post/src/Form/PostForm.php \Drupal\social_post\Form\PostForm::setFormMode()
Function to set the current form modes.
Retrieve the form display before it is overwritten in the parent.
2 calls to PostForm::setFormMode()
- PostForm::buildForm in modules/
social_features/ social_post/ src/ Form/ PostForm.php - Form constructor.
- PostForm::save in modules/
social_features/ social_post/ src/ Form/ PostForm.php - Form submission handler for the 'save' action.
File
- modules/
social_features/ social_post/ src/ Form/ PostForm.php, line 238
Class
- PostForm
- Form controller for Post edit forms.
Namespace
Drupal\social_post\FormCode
protected function setFormMode() {
if ($this
->getBundleEntity() !== NULL) {
$bundle = $this
->getBundleEntity()
->id();
// Set as variables, since the bundle might be different.
$this->postViewDefault = 'post.' . $bundle . '.default';
$this->postViewProfile = 'post.' . $bundle . '.profile';
$this->postViewGroup = 'post.' . $bundle . '.group';
}
}