You are here

class Before in Forena Reports 8

Same name and namespace in other branches
  1. 7.4 AjaxCommand/Before.php \Drupal\forena\FrxPlugin\AjaxCommand\Before

Before command

Plugin annotation


@FrxAjaxCommand(
  id = "before"
)

Hierarchy

Expanded class hierarchy of Before

File

src/FrxPlugin/AjaxCommand/Before.php, line 20

Namespace

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

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

}

Members

Namesort descending Modifiers Type Description Overrides
AjaxCommandBase::$replacer protected static property
AjaxCommandBase::getJSONText public function Get json text.
AjaxCommandBase::getSetting public function
AjaxCommandBase::replacer public static function Report Replacer.
Before::commandFromSettings public function JQuery Before Command Overrides AjaxCommandInterface::commandFromSettings