You are here

class Replace in Forena Reports 7.4

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

Replace command

Plugin annotation


@FrxAjaxCommand(
  id = "replace"
)

Hierarchy

Expanded class hierarchy of Replace

1 string reference to 'Replace'
Frx::getAjaxPlugin in ./Frx.inc

File

AjaxCommand/Replace.php, line 19

Namespace

Drupal\forena\FrxPlugin\AjaxCommand
View source
class Replace extends AjaxCommandBase {

  /**
   * JQuery Replace Command
   *
   * Settings:
   *   - selector: JQuery selector to use for Replace.
   *   - text: HTML to use to replace
   *
   * @param array $settings
   *   Settings for command
   * @return array
   */
  public function commandFromSettings(array $settings) {
    $text = $this
      ->getSetting($settings, 'text');
    $selector = $this
      ->getSetting($settings, 'selector');
    return ajax_command_replace($selector, $text, $settings);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AjaxCommandBase::$replacer protected property
AjaxCommandBase::getJSONText public function
AjaxCommandBase::getSetting public function
AjaxCommandBase::__construct public function AjaxCommandBase constructor.
Replace::commandFromSettings public function JQuery Replace Command Overrides AjaxCommandInterface::commandFromSettings