workflow_views_handler_argument_state.inc 682 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * Provide views argument handler for workflow.module.
  5. */
  6. /**
  7. * Argument handler to accept a node type.
  8. */
  9. class views_handler_argument_workflow_state extends views_handler_argument {
  10. function construct() {
  11. parent::construct('type');
  12. }
  13. /**
  14. * Overrides the behavior of summary_name().
  15. *
  16. * Gets the user-friendly version of the workflow state.
  17. */
  18. function summary_name($data) {
  19. return workflow_get_sid_label($data->{$this->name_alias});
  20. }
  21. /**
  22. * Overrides the behavior of title().
  23. * Get the user-friendly version of the workflow state.
  24. */
  25. function title() {
  26. return workflow_get_sid_label($this->argument);
  27. }
  28. }