You are here

public function Prepend::commandFromSettings in Forena Reports 8

Same name and namespace in other branches
  1. 7.4 AjaxCommand/Prepend.php \Drupal\forena\FrxPlugin\AjaxCommand\Prepend::commandFromSettings()

JQuery Prepend Command

Settings:

  • selector: JQuery selector to use for Prepend.
  • text: HTML to use to replace

Parameters

array $settings: Settings for command

Return value

\Drupal\Core\Ajax\PrependCommand

Overrides AjaxCommandInterface::commandFromSettings

File

src/FrxPlugin/AjaxCommand/Prepend.php, line 33

Class

Prepend
Prepend command

Namespace

Drupal\forena\FrxPlugin\AjaxCommand

Code

public function commandFromSettings(array $settings) {
  $text = $this
    ->getSetting($settings, 'text');
  $selector = $this
    ->getSetting($settings, 'selector');
  return new PrependCommand($selector, $text, $settings);
}