public function UserRegisterBlock::blockForm in Form Block 2.0.x
Overrides \Drupal\block\BlockBase::blockForm().
Overrides BlockPluginTrait::blockForm
File
- src/
Plugin/ Block/ UserRegisterBlock.php, line 124
Class
- UserRegisterBlock
- Provides a block for the user registration form.
Namespace
Drupal\formblock\Plugin\BlockCode
public function blockForm($form, FormStateInterface $form_state) {
$form['user_registration_settings_note'] = [
'#markup' => $this
->t('<b>NOTE</b>: the display of this form is overriden by the option selected on ' . '<a href="/admin/config/people/accounts#edit-admin-role">Account Settings</a>.<br> If you have selected "Administrators Only" ' . 'this form will only show to Administrators regardless of other options selected on this block'),
];
$form['formblock_user_form_mode'] = [
'#title' => $this
->t('Form mode'),
'#description' => $this
->t('Select the form mode that will be shown in the block.'),
'#type' => 'select',
'#required' => TRUE,
'#options' => $this
->getFormModes(),
'#default_value' => $this->configuration['form_mode'],
];
return $form;
}