public function GroupContentForm::form in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Form/GroupContentForm.php \Drupal\group\Entity\Form\GroupContentForm::form()
Gets the actual form array to be built.
Overrides ContentEntityForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
1 call to GroupContentForm::form()
- GroupJoinForm::form in src/
Form/ GroupJoinForm.php - Gets the actual form array to be built.
1 method overrides GroupContentForm::form()
- GroupJoinForm::form in src/
Form/ GroupJoinForm.php - Gets the actual form array to be built.
File
- src/
Entity/ Form/ GroupContentForm.php, line 48
Class
- GroupContentForm
- Form controller for the group content edit forms.
Namespace
Drupal\group\Entity\FormCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
// Do not allow to edit the group content subject through the UI. Also hide
// the field when we are on step 2 of a creation wizard.
if ($this->operation !== 'add' || $form_state
->get('group_wizard')) {
$form['entity_id']['#access'] = FALSE;
}
return $form;
}