public FilterFormatEditForm::form(array $form, FormStateInterface $form_state)
Gets the actual form array to be built.
Overrides FilterFormatFormBase::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- core/modules/filter/src/FilterFormatEditForm.php, line 16
Class
- FilterFormatEditForm
- Provides a form for adding a filter format.
Namespace
Drupal\filter
Code
1 2 3 4 5 6 7 8 9 10 | public function form( array $form , FormStateInterface $form_state ) { if (! $this ->entity->status()) { throw new NotFoundHttpException(); } $form [ '#title' ] = $this ->entity->label(); $form = parent::form( $form , $form_state ); $form [ 'roles' ][ '#default_value' ] = array_keys (filter_get_roles_by_format( $this ->entity)); return $form ; } |
Please login to continue.