/**
  * Creates and returns the HTML for a single watchlist group.
  *
  * @since 0.1
  *
  * @param SWLGroup $group
  *
  * @return string
  */
 protected function getGroupHtml(SWLGroup $group)
 {
     $namespaces = $group->getNamespaces();
     foreach ($namespaces as &$ns) {
         $ns = $ns == 0 ? 'Main' : MWNamespace::getCanonicalName($ns);
     }
     return Html::rawElement('fieldset', array('id' => 'swl_group_' . $group->getId(), 'groupid' => $group->getId(), 'class' => 'swl_group', 'groupname' => $group->getName(), 'categories' => implode('|', $group->getCategories()), 'namespaces' => implode('|', $namespaces), 'properties' => implode('|', $group->getProperties()), 'concepts' => implode('|', $group->getConcepts()), 'customTexts' => implode('|', $group->getSerializedCustomTexts())), Html::element('legend', array(), $this->msg('swl-group-legend')->text()));
 }