Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TriggerPreviewCommand.php

class TriggerPreviewCommand

Provides an AJAX command for triggering the views live preview.

This command is implemented in Drupal.AjaxCommands.prototype.viewsTriggerPreview.

Hierarchy

  • class \Drupal\views\Ajax\TriggerPreviewCommand implements \Drupal\Core\Ajax\CommandInterface

Expanded class hierarchy of TriggerPreviewCommand

1 file declares its use of TriggerPreviewCommand
ViewsFormBase.php in core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php

File

core/modules/views/src/Ajax/TriggerPreviewCommand.php, line 12

Namespace

Drupal\views\Ajax
View source
class TriggerPreviewCommand implements CommandInterface {
    
    /**
     * {@inheritdoc}
     */
    public function render() {
        return [
            'command' => 'viewsTriggerPreview',
        ];
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
TriggerPreviewCommand::render public function Return an array to be run through json_encode and sent to the client. Overrides CommandInterface::render

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal