You are here

public function MobileDetectPlatform::buildConfigurationForm in Mobile Detect 8.2

*

Overrides ConditionPluginBase::buildConfigurationForm

File

src/Plugin/Condition/MobileDetectPlatform.php, line 60

Class

MobileDetectPlatform
Provides the 'Device platform' condition.

Namespace

Drupal\mobile_detect\Plugin\Condition

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form['platform'] = [
    '#type' => 'checkboxes',
    '#title' => $this
      ->t('When the platform is determined'),
    '#default_value' => $this->configuration['platform'],
    '#options' => [
      'android' => $this
        ->t('Android'),
      'ios' => $this
        ->t('iOS'),
    ],
    '#description' => $this
      ->t('No platforms will evaluate TRUE for all.'),
  ];
  return parent::buildConfigurationForm($form, $form_state);
}