public function PathFileEntitySettingsForm::buildForm in Path File 8
Defines the settings form for Path file entity entities.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array Form definition array.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ PathFileEntitySettingsForm.php, line 103
Class
- PathFileEntitySettingsForm
- Class PathFileEntitySettingsForm.
Namespace
Drupal\path_file\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['PathFileEntity_settings']['#markup'] = 'Settings form for Path file entity entities. Manage field settings here.';
$config = $this
->config('path_file.settings');
$allowed_extensions = $config
->get('allowed_extensions');
$form['allowed_extensions'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Allowed File Extensions'),
'#default_value' => $allowed_extensions,
);
return parent::buildForm($form, $form_state);
}