You are here

function _filebrowser_properties_to_checkboxes in Filebrowser 7.4

Same name and namespace in other branches
  1. 8 filebrowser.helpers.inc \_filebrowser_properties_to_checkboxes()
  2. 6.2 includes/helpers.inc \_filebrowser_properties_to_checkboxes()
  3. 7.2 filebrowser.helpers.inc \_filebrowser_properties_to_checkboxes()
  4. 7.3 filebrowser.helpers.inc \_filebrowser_properties_to_checkboxes()

Convert an array for formapi checkboxes comatibiility.

Parameters

$properties source array:

Return value

formapi checkboxes

1 call to _filebrowser_properties_to_checkboxes()
filebrowser_form in ./filebrowser.module
Implements hook_form(). @inheritdoc

File

./filebrowser.helpers.inc, line 33
Misc helper functions.

Code

function _filebrowser_properties_to_checkboxes(&$properties) {
  $result = array();
  if ($properties) {
    foreach ($properties as $key => $value) {
      if ($value) {
        $result[$key] = $key;
      }
    }
  }
  return $result;
}