You are here

protected function WebformElementBase::getFormInlineContainer in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::getFormInlineContainer()

Get form--inline container which is used for side-by-side element layout.

Return value

array A container element with .form--inline class if inline help text is enabled.

10 calls to WebformElementBase::getFormInlineContainer()
Checkboxes::form in src/Plugin/WebformElement/Checkboxes.php
Gets the actual configuration webform array to be built.
DateBase::form in src/Plugin/WebformElement/DateBase.php
Gets the actual configuration webform array to be built.
DateTime::form in src/Plugin/WebformElement/DateTime.php
Gets the actual configuration webform array to be built.
NumericBase::form in src/Plugin/WebformElement/NumericBase.php
Gets the actual configuration webform array to be built.
OptionsBase::form in src/Plugin/WebformElement/OptionsBase.php
Gets the actual configuration webform array to be built.

... See full list

File

src/Plugin/WebformElementBase.php, line 3483

Class

WebformElementBase
Provides a base class for a webform element.

Namespace

Drupal\webform\Plugin

Code

protected function getFormInlineContainer() {
  $help_enabled = $this->configFactory
    ->get('webform.settings')
    ->get('ui.description_help');
  return [
    '#type' => 'container',
    '#attributes' => $help_enabled ? [
      'class' => [
        'form--inline',
        'clearfix',
        'webform-ui-element-form-inline--input',
      ],
    ] : [],
  ];
}