You are here

function event_enabled_state in Event 5.2

Same name and namespace in other branches
  1. 5 event.module \event_enabled_state()

Find the state of a node type. The state determines if and how those nodes will be displayed in the calendar. The state values are: 'all' Always shown in the calendar. 'solo' Only shown with nodes of its type. 'never' Never show in the calendar.

Parameters

$type node type:

Return value

state value

1 call to event_enabled_state()
event_link in ./event.module
Provides the links that should be displayed when viewing events.

File

./event.module, line 2374

Code

function event_enabled_state($type) {
  $states = event_get_types();
  foreach ($states as $key => $state) {
    if (in_array($type, $state)) {
      return $key;
    }
  }
}