chosen.variable.inc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * @file
  4. * Definition of variables for Variable API module.
  5. */
  6. /**
  7. * Implements hook_variable_info().
  8. */
  9. function chosen_variable_info($options) {
  10. $variables['chosen_placeholder_text_multiple'] = array(
  11. 'type' => 'string',
  12. 'title' => t('Placeholder text of multiple selects'),
  13. 'default' => 'Choose some options',
  14. 'required' => TRUE,
  15. 'group' => 'chosen',
  16. 'localize' => TRUE,
  17. );
  18. $variables['chosen_placeholder_text_single'] = array(
  19. 'type' => 'string',
  20. 'title' => t('Placeholder text of single selects'),
  21. 'default' => 'Choose an option',
  22. 'required' => TRUE,
  23. 'group' => 'chosen',
  24. 'localize' => TRUE,
  25. );
  26. $variables['chosen_no_results_text'] = array(
  27. 'type' => 'string',
  28. 'title' => t('No results text'),
  29. 'default' => 'No results match',
  30. 'required' => TRUE,
  31. 'group' => 'chosen',
  32. 'localize' => TRUE,
  33. );
  34. return $variables;
  35. }
  36. /**
  37. * Implements hook_variable_group_info().
  38. */
  39. function chosen_variable_group_info() {
  40. $groups['chosen'] = array(
  41. 'title' => t('Chosen'),
  42. 'description' => t('Chosen javascript library.'),
  43. 'access' => 'administer site configuration',
  44. 'path' => array('admin/config/user-interface/chosen'),
  45. );
  46. return $groups;
  47. }