You are here

public function VLMAppendCommand::__construct in Views Load More 2.x

Same name and namespace in other branches
  1. 8 src/Ajax/VLMAppendCommand.php \Drupal\views_load_more\Ajax\VLMAppendCommand::__construct()

Constructs a \Drupal\views\Ajax\ScrollTopCommand object. @todo document

Parameters

$content:

array $options: Array with the following keys:

  • method
  • wrapper_selector
  • content_selector
  • pager_selector
  • effect
  • speed
  • target_list

File

src/Ajax/VLMAppendCommand.php, line 52

Class

VLMAppendCommand
Provides an AJAX command for appending new rows in a paged AJAX response to the rows on the page.

Namespace

Drupal\views_load_more\Ajax

Code

public function __construct($content, $options) {
  $this->content = $content;
  $defaults = array(
    'method' => 'append',
    'wrapper_selector' => NULL,
    'content_selector' => LoadMore::DEFAULT_CONTENT_SELECTOR,
    'pager_selector' => LoadMore::DEFAULT_PAGER_SELECTOR,
    'effect' => '',
    'speed' => '',
    'target_list' => '',
  );
  $this->options = array_merge($defaults, $options);
}