コード例 #1
0
 function getTopicAutoSubscribeName($topic_auto)
 {
     $_messageResources =& Subscriptions::getMessageResources();
     $names = Subscriptions::getTopicAutoSubscribeNames();
     return isset($names[$topic_auto]) ? $names[$topic_auto] : $_messageResources->getMessage('TOPIC_AUTOSUBSCRIBE_UNKNOWN');
 }
コード例 #2
0
 function getTopicAutoSubscribeSelect($select_name, $selected_option = null)
 {
     $statuses = Subscriptions::getTopicAutoSubscribeNames();
     if (empty($selected_option)) {
         $selected_option = SUBSCRIPTION_TOPIC_AUTOSUBSCRIBE_YES;
     }
     $options = array();
     foreach ($statuses as $status => $status_name) {
         $options[] = array('value' => $status, 'contents' => $status_name);
     }
     return HtmlForm::getRadio(array('select_name' => $select_name, 'values' => $options, 'selected_value' => $selected_option));
 }