so__cds_widget.inc 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. class so__cds_widget extends TripalFieldWidget {
  3. // The default lable for this field.
  4. public static $label = 'Coding Sequence';
  5. // The list of field types for which this formatter is appropriate.
  6. public static $field_types = array('so__cds');
  7. /**
  8. *
  9. * @see TripalFieldWidget::form()
  10. */
  11. public function form(&$widget, &$form, &$form_state, $langcode, $items, $delta, $element) {
  12. parent::form($widget, $form, $form_state, $langcode, $items, $delta, $element);
  13. // TODO: add a widget...
  14. }
  15. /**
  16. * Performs validation of the widgetForm.
  17. *
  18. * Use this validate to ensure that form values are entered correctly. Note
  19. * this is different from the validate() function which ensures that the
  20. * field data meets expectations.
  21. *
  22. * @param $form
  23. * @param $form_state
  24. */
  25. public function validate($form, &$form_state, $entity_type, $entity, $langcode, $delta) {
  26. }
  27. /**
  28. *
  29. * @see TripalFieldWidget::submit()
  30. */
  31. public function submit($form, &$form_state, $entity_type, $entity, $langcode, $delta) {
  32. $field_name = $this->field['field_name'];
  33. }
  34. }