public function getCategoriesByBranch($branch_id) {
    $categories = [];

    $map = $this->getMapCategoriesByBranch();
    if (isset($map[$branch_id])) {
      $categories = $map[$branch_id];
    }

    $data = array_combine(array_values($categories), array_values($categories));
    return $data;
  }
public function getCategoriesByBranch($branch_id) {
    $categories = [];

    $map = $this->getMapCategoriesByBranch();
    if (isset($map[$branch_id])) {
      $categories = $map[$branch_id];
    }

    $data = array_combine(array_values($categories), array_values($categories));
    return $data;
  }
public function getCategoriesByBranch ( $ branch_id ) { $ categories = [ ] ; $ map = $ this -> getMapCategoriesByBranch ( ) ; if ( isset ( $ map [ $ branch_id ] ) ) { $ categories = $ map [ $ branch_id ] ; } $ data = array_combine ( array_values ( $ categories ) , array_values ( $ categories ) ) ; return $ data ; }
Get categories by Branch.

@param int $branch_id
Branch ID.

@return array
Categories list.
Get categories by Branch .