You are here

function sms_dir in SMS Framework 6

Same name and namespace in other branches
  1. 6.2 sms.module \sms_dir()
  2. 7 sms.module \sms_dir()

Render a direction code

Parameters

$out bool Outgoing allowed or not:

$in bool Incoming allowed or not:

Return value

const The constant that defines this direction combination. Usually an integer value.

2 calls to sms_dir()
sms_valid_admin_rulesets_form_submit in modules/sms_valid/sms_valid.admin.inc
sms_valid_admin_ruleset_form_submit in modules/sms_valid/sms_valid.admin.inc

File

./sms.module, line 511
The core of the SMS Framework. Provides gateway managment and API for sending and receiving SMS messages.

Code

function sms_dir($out, $in) {
  if ($out && $in) {
    return SMS_DIR_ALL;
  }
  if ($out && !$in) {
    return SMS_DIR_OUT;
  }
  if (!$out && $in) {
    return SMS_DIR_IN;
  }
  if (!$out && !$in) {
    return SMS_DIR_NONE;
  }
}