You are here

public function HeartbeatController::commentConfigUpdate in Heartbeat 8

1 string reference to 'HeartbeatController::commentConfigUpdate'
heartbeat.routing.yml in ./heartbeat.routing.yml
heartbeat.routing.yml

File

src/Controller/HeartbeatController.php, line 241

Class

HeartbeatController
Class HeartbeatController.

Namespace

Drupal\heartbeat\Controller

Code

public function commentConfigUpdate($entity_id) {
  $commentConfig = \Drupal::configFactory()
    ->getEditable('heartbeat_comment.settings');
  $commentConfig
    ->set('entity_id', $entity_id)
    ->save();
  return [
    '#type' => 'markup',
    '#markup' => 'Success',
  ];
}