You are here

function _filebrowser_properties_to_checkboxes in Filebrowser 8

Same name and namespace in other branches
  1. 6.2 includes/helpers.inc \_filebrowser_properties_to_checkboxes()
  2. 7.4 filebrowser.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

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;
}