/** * Creates an XhtmlOption from a category * * @param int $id * @param Category $object * @return XhtmlOption */ protected function CreateOption($id, $object) { $opt = new XhtmlOption(ucfirst($object->__toString()), $id . RelatedItemEditor::VALUE_DIVIDER . ucfirst($object->__toString())); $opt->AddAttribute('style', 'padding-left: ' . ($object->GetHierarchyLevel() - 1) * 20 . 'px'); return $opt; }