You are here

function extractConfigFormStates in Form Mode Control 8

Parameters

$configurations:

Return value

array

1 call to extractConfigFormStates()
getTheRightDisplay in ./form_mode_control.module
If the user does'nt has the permission to a form mode, he redirected to the default form mode configured in the configure page.

File

./form_mode_control.module, line 48

Code

function extractConfigFormStates($configurations, $mode = "creation_", $id_role = "authenticated") {
  $configuration_form_state = array();
  foreach ($configurations as $form_state_key => $display) {
    if (substr_count($form_state_key, $mode) != 0 && $display != NULL && substr_count($form_state_key, $id_role) != 0) {
      $configuration_form_state[$form_state_key] = $display;
    }
  }
  return $configuration_form_state;
}