You are here

protected function RemoteCalls::getAvailableRcActions in Anti Spam by CleanTalk 8.4

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

Get available remote calls from the storage.

Return value

array

Overrides RemoteCalls::getAvailableRcActions

1 call to RemoteCalls::getAvailableRcActions()
RemoteCalls::setLastCall in src/lib/Cleantalk/ApbctDrupal/RemoteCalls.php
Set last call timestamp and save it to the storage.

File

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

Class

RemoteCalls

Namespace

Cleantalk\ApbctDrupal

Code

protected function getAvailableRcActions() {
  $remote_calls = \Drupal::state()
    ->get('cleantalk_remote_calls');
  if ($remote_calls && !empty($remote_calls)) {
    return empty(array_diff_key($remote_calls, $this->default_rc)) ? $remote_calls : $this->default_rc;
  }
  return $this->default_rc;
}