Beispiel #1
0
 private function buildCheckListHTML($term, $level, $checked)
 {
     global $rowClass;
     $category = new cnCategory($term);
     $pad = str_repeat('   ', max(0, $level));
     if (!empty($checked)) {
         if (in_array($category->getId(), $checked)) {
             $checkString = ' CHECKED ';
         } else {
             $checkString = NULL;
         }
     } else {
         $checkString = NULL;
     }
     $out = '<li id="category-' . $category->getId() . '" class="category"><label class="selectit">' . $pad . '<input id="check-category-' . $category->getId() . '" type="checkbox" name="entry_category[]" value="' . $category->getId() . '" ' . $checkString . '> ' . $category->getName() . '</input></label></li>';
     return $out;
 }