You are here

class Prepend in Forena Reports 7.4

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

Prepend command

Plugin annotation


@FrxAjaxCommand(
  id = "prepend"
)

Hierarchy

Expanded class hierarchy of Prepend

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

File

AjaxCommand/Prepend.php, line 19

Namespace

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

  /**
   * JQuery Prepend Command
   *
   * Settings:
   *   - selector: JQuery selector to use for Prepend.
   *   - 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_prepend($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.
Prepend::commandFromSettings public function JQuery Prepend Command Overrides AjaxCommandInterface::commandFromSettings