You are here

function _oauth_common_auth_level_from_values in OAuth 1.0 6.3

Helper function to create a authorization level array from form values.

Parameters

string $idx:

string $values:

Return value

array

2 calls to _oauth_common_auth_level_from_values()
oauth_common_edit_form_context_submit in ./oauth_common.admin.inc
Process submission of the mini panel edit form.
oauth_common_edit_form_context_validate in ./oauth_common.admin.inc
Validate submission of the preset edit form.

File

./oauth_common.admin.inc, line 479

Code

function _oauth_common_auth_level_from_values($idx, $values) {
  $level = array(
    'name' => NULL,
    'title' => NULL,
    'description' => NULL,
    'default' => FALSE,
    'delete' => FALSE,
  );
  foreach (array_keys($level) as $key) {
    $level[$key] = $values["l_{$idx}_{$key}"];
  }
  return $level;
}