You are here

function mee_widget_settings in Scald: Media Management made easy 6

Implementation of hook_widget_settings().

File

mee/mee.module, line 362
Defines a special textarea, with drag and drop media driven by Scald and dnd.module when rich text editing is enabled on the textarea via the WYSIWYG API.

Code

function mee_widget_settings($op, $widget) {
  switch ($op) {
    case 'form':
      $form = array();
      $rows = isset($widget['rows']) && is_numeric($widget['rows']) ? $widget['rows'] : 60;
      $form['rows'] = array(
        '#type' => 'textfield',
        '#title' => t('Rows'),
        '#default_value' => $rows,
        '#element_validate' => array(
          '_mee_widget_settings_row_validate',
        ),
        '#required' => TRUE,
      );
      return $form;
    case 'save':
      return array(
        'rows',
      );
  }
}