public function BlazyAdminTest::buildSettingsForm in Blazy 8
Same name and namespace in other branches
- 8.2 tests/modules/blazy_test/src/Form/BlazyAdminTest.php \Drupal\blazy_test\Form\BlazyAdminTest::buildSettingsForm()
Returns all settings form elements.
File
- tests/
modules/ blazy_test/ src/ Form/ BlazyAdminTest.php, line 89
Class
- BlazyAdminTest
- Provides resusable admin functions or form elements.
Namespace
Drupal\blazy_test\FormCode
public function buildSettingsForm(array &$form, $definition = []) {
$definition += [
'namespace' => 'blazy',
'optionsets' => [],
'skins' => $this
->getSkinOptions(),
'grid_form' => TRUE,
'style' => TRUE,
];
foreach ([
'background',
'caches',
'fieldable_form',
'id',
'vanilla',
] as $key) {
$definition[$key] = TRUE;
}
$definition['layouts'] = isset($definition['layouts']) ? array_merge($this
->getLayoutOptions(), $definition['layouts']) : $this
->getLayoutOptions();
$this
->openingForm($form, $definition);
$this
->mainForm($form, $definition);
$this
->closingForm($form, $definition);
}