You are here

protected function RemoteCalls::setLastCall in Anti Spam by CleanTalk 9.1.x

Same name in this branch
  1. 9.1.x src/lib/Cleantalk/Common/RemoteCalls.php \Cleantalk\Common\RemoteCalls::setLastCall()
  2. 9.1.x src/lib/Cleantalk/ApbctDrupal/RemoteCalls.php \Cleantalk\ApbctDrupal\RemoteCalls::setLastCall()
Same name and namespace in other branches
  1. 8.4 src/lib/Cleantalk/ApbctDrupal/RemoteCalls.php \Cleantalk\ApbctDrupal\RemoteCalls::setLastCall()

Set last call timestamp and save it to the storage.

Parameters

string $action:

Return value

void

Overrides RemoteCalls::setLastCall

File

src/lib/Cleantalk/ApbctDrupal/RemoteCalls.php, line 49

Class

RemoteCalls

Namespace

Cleantalk\ApbctDrupal

Code

protected function setLastCall($action) {

  // TODO: Implement setLastCall() method.
  $remote_calls = $this
    ->getAvailableRcActions();
  $remote_calls[$action]['last_call'] = time();
  \Drupal::state()
    ->set('cleantalk_remote_calls', $remote_calls);
}