You are here

public function HeartbeatUpdateFeedForm::updateFeed in Heartbeat 8

File

src/Form/HeartbeatUpdateFeedForm.php, line 126

Class

HeartbeatUpdateFeedForm
Class HeartbeatUpdateFeedForm.

Namespace

Drupal\heartbeat\Form

Code

public function updateFeed(array &$form, FormStateInterface $form_state) {
  \Drupal::logger('HeartbeatUpdateFeedForm::updateFeed')
    ->debug('update Feed is getting called');
  $feedUpdateConfig = new \stdClass();
  $feedUpdateConfig->feed = 'Node Activity';
  $feedUpdateConfig->update = true;
  $feedUpdateConfig->timestamp = 123456789;
  $ajaxResponse = new AjaxResponse();
  $updateCommand = new UpdateFeedCommand($feedUpdateConfig);
  $ajaxResponse
    ->addCommand($updateCommand);
  return $ajaxResponse;
}