/** * {@inheritdoc} */ 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; }
/** * {@inheritdoc} */ public function form(array $form, FormStateInterface $form_state) { return parent::form($form, $form_state); }