You are here

function asset_widget_settings in Asset 5.2

Same name and namespace in other branches
  1. 5 modules/asset_content.inc \asset_widget_settings()
  2. 6 modules/asset_content.inc \asset_widget_settings()
  3. 6 inc/modules/asset_content.inc \asset_widget_settings()

Implementation of hook_widget_settings().

File

modules/asset_content.inc, line 183

Code

function asset_widget_settings($op, $widget) {
  switch ($op) {
    case 'form':
      $form = array();
      if ($widget['type'] == 'directory') {
        $form['parent'] = array(
          '#type' => 'select',
          '#title' => t('Parent Directory'),
          '#options' => asset_directory_options(),
          '#default_value' => $widget['parent'],
        );
      }
      return $form;
    case 'validate':
      break;
    case 'save':
      if ($widget['type'] == 'directory') {
        return array(
          'parent',
        );
      }
      return array();
  }
}