You are here

BootstrapjsAlert.php in Openlayers 7.3

Component: Bootstrap JS.

File

src/Plugin/Component/BootstrapjsAlert/BootstrapjsAlert.php
View source
<?php

/**
 * @file
 * Component: Bootstrap JS.
 */
namespace Drupal\openlayers\Plugin\Component\BootstrapjsAlert;

use Drupal\openlayers\Types\Component;

/**
 * Class BootstrapjsAlert.
 *
 * @OpenlayersPlugin(
 *  id = "BootstrapjsAlert"
 * )
 */
class BootstrapjsAlert extends Component {

  /**
   * {@inheritdoc}
   */
  public function attached() {
    $attached = parent::attached();
    $attached['libraries_load'][] = array(
      'bootstrap',
    );
    return $attached;
  }

  /**
   * {@inheritdoc}
   */
  public function dependencies() {
    return array(
      'bootstrap_library',
    );
  }

  /**
   * {@inheritdoc}
   */
  public function optionsForm(array &$form, array &$form_state) {
    $form['options']['message'] = array(
      '#type' => 'textarea',
      '#title' => t('Text to display'),
      '#default_value' => $this
        ->getOption('message'),
    );
  }

}

Classes

Namesort descending Description
BootstrapjsAlert Class BootstrapjsAlert.