You are here

function sms_test_gateway_get_incoming in SMS Framework 8

Same name and namespace in other branches
  1. 7 tests/sms_test_gateway/sms_test_gateway.module \sms_test_gateway_get_incoming()
  2. 2.x tests/modules/sms_test_gateway/sms_test_gateway.module \sms_test_gateway_get_incoming()
  3. 2.1.x tests/modules/sms_test_gateway/sms_test_gateway.module \sms_test_gateway_get_incoming()

Gets incoming data from static.

File

tests/modules/sms_test_gateway/sms_test_gateway.module, line 11
A test gateway to be used for testing the SMS Framework.

Code

function sms_test_gateway_get_incoming($reset = FALSE) {
  $key = 'sms_test_gateway_sms_incoming_preprocess';
  $result =& drupal_static($key);
  if (!isset($result)) {
    $result = \Drupal::state()
      ->get($key, []);
  }
  if ($reset) {
    \Drupal::state()
      ->delete($key);
    drupal_static_reset($key);
  }
  return $result;
}