public function configure()
 {
     $intervalConfigs = opChatPluginConfiguration::getIntervalConfigs();
     foreach ($intervalConfigs as $key => $value) {
         $this->setWidget($key, new sfWidgetFormInputText());
         $this->setValidator($key, new sfValidatorInteger(array('min' => 1)));
         $this->setDefault($key, $value);
         if (isset(self::$widgetLabel[$key])) {
             $this->widgetSchema->setLabel($key, self::$widgetLabel[$key]);
         }
     }
     $this->widgetSchema->setNameFormat('interval[%s]');
 }
Exemple #2
0
?>

<?php 
end_slot();
?>

<?php 
op_include_box('chatroom_body', get_slot('chatroom_body'), array('title' => $room->getTitle()));
?>

<?php 
javascript_tag();
?>
var op_chat = new Chat({
<?php 
foreach (opChatPluginConfiguration::getIntervalConfigs() as $interval => $value) {
    ?>
  <?php 
    echo sprintf('%s: %d,', $interval, $value) . "\n";
}
if (($sounds = op_chat_get_sounds()) !== null) {
    ?>
  sounds: <?php 
    echo json_encode($sounds);
    ?>
,
<?php 
}
?>
  url: {
    post: "<?php