You are here

public function BlazyAdminTest::mainForm in Blazy 8

Same name and namespace in other branches
  1. 8.2 tests/modules/blazy_test/src/Form/BlazyAdminTest.php \Drupal\blazy_test\Form\BlazyAdminTest::mainForm()

Returns the main form elements.

1 call to BlazyAdminTest::mainForm()
BlazyAdminTest::buildSettingsForm in tests/modules/blazy_test/src/Form/BlazyAdminTest.php
Returns all settings form elements.

File

tests/modules/blazy_test/src/Form/BlazyAdminTest.php, line 119

Class

BlazyAdminTest
Provides resusable admin functions or form elements.

Namespace

Drupal\blazy_test\Form

Code

public function mainForm(array &$form, $definition = []) {
  if (!empty($definition['image_style_form'])) {
    $this->blazyAdmin
      ->imageStyleForm($form, $definition);
  }
  if (!empty($definition['media_switch_form'])) {
    $this->blazyAdmin
      ->mediaSwitchForm($form, $definition);
  }
  if (!empty($definition['grid_form'])) {
    $this->blazyAdmin
      ->gridForm($form, $definition);
  }
  if (!empty($definition['fieldable_form'])) {
    $this->blazyAdmin
      ->fieldableForm($form, $definition);
  }
  if (!empty($definition['breakpoints'])) {
    $this->blazyAdmin
      ->breakpointsForm($form, $definition);
  }
}