You are here

public function Replace::commandFromSettings in Forena Reports 7.4

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

JQuery Replace Command

Settings:

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

Parameters

array $settings: Settings for command

Return value

array

Overrides AjaxCommandInterface::commandFromSettings

File

AjaxCommand/Replace.php, line 32

Class

Replace
Replace command

Namespace

Drupal\forena\FrxPlugin\AjaxCommand

Code

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