You are here

public function Workflow::getSetting in Workflow 7

Same name and namespace in other branches
  1. 7.2 includes/Entity/Workflow.php \Workflow::getSetting()

File

includes/Entity/Workflow.php, line 321
Contains workflow\includes\Entity\Workflow.

Class

Workflow
@file Contains workflow\includes\Entity\Workflow.

Code

public function getSetting($key, array $field = array()) {
  switch ($key) {
    case 'watchdog_log':
      if (isset($workflow->options['watchdog_log'])) {

        // This is set via Node API.
        return $workflow->options['watchdog_log'];
      }
      elseif ($field) {
        if (isset($field['settings']['watchdog_log'])) {

          // This is set via Field API.
          return $field['settings']['watchdog_log'];
        }
      }
      drupal_set_message('Setting Workflow::getSetting(' . $key . ') does not exist', 'error');
      break;
    default:
      drupal_set_message('Setting Workflow::getSetting(' . $key . ') does not exist', 'error');
  }
}