/**
  * @return void
  * @desc Re-build from data posted by this control the data object this control is editing
  */
 function BuildPostedDataObject()
 {
     /* @var $o_category Category */
     $o_category = new Category();
     if (isset($_POST['item'])) {
         $o_category->SetId($_POST['item']);
     }
     $o_category->SetName($_POST['displayName']);
     $o_category->SetParentId($_POST['parent_id']);
     $o_category->SetUrl($_POST['name']);
     $o_category->SetSortOverride($_POST['sort']);
     $this->SetDataObject($o_category);
 }
 /**
  * Populates the collection of business objects from raw data
  *
  * @return bool
  * @param MySqlRawData $o_result
  */
 protected function BuildItems(MySqlRawData $o_result)
 {
     while ($o_row = $o_result->fetch()) {
         # create the new category
         $o_category = new Category();
         $o_category->SetId($o_row->id);
         $o_category->SetName($o_row->name);
         $o_category->SetParentId((int) $o_row->parent);
         $o_category->SetUrl($o_row->code);
         $o_category->SetSortOverride($o_row->sort_override);
         $o_category->SetNavigateUrl($o_row->navigate_url);
         $o_category->SetHierarchyLevel($o_row->hierarchy_level);
         $this->Add($o_category);
     }
 }