original_string: public static function get_category_options($includeinherit, $includenotset) {
          $warnings = [];
  
          $params = self::validate_parameters(self::get_category_options_parameters(), [
              'includeinherit' => $includeinherit,
              'includenotset' => $includenotset
          ]);
          $includeinherit = $params['includeinherit'];
          $includenotset = $params['includenotset'];
  
          $context = context_system::instance();
          self::validate_context($context);
          api::check_can_manage_data_registry();
  
          $categories = api::get_categories();
          $options = data_registry_page::category_options($categories, $includenotset, $includeinherit);
          $categoryoptions = [];
          foreach ($options as $id => $name) {
              $categoryoptions[] = [
                  'id' => $id,
                  'name' => $name,
              ];
          }
  
          return [
              'options' => $categoryoptions,
              'warnings' => $warnings
          ];
      }
code: public static function get_category_options($includeinherit, $includenotset) {
          $warnings = [];
  
          $params = self::validate_parameters(self::get_category_options_parameters(), [
              'includeinherit' => $includeinherit,
              'includenotset' => $includenotset
          ]);
          $includeinherit = $params['includeinherit'];
          $includenotset = $params['includenotset'];
  
          $context = context_system::instance();
          self::validate_context($context);
          api::check_can_manage_data_registry();
  
          $categories = api::get_categories();
          $options = data_registry_page::category_options($categories, $includenotset, $includeinherit);
          $categoryoptions = [];
          foreach ($options as $id => $name) {
              $categoryoptions[] = [
                  'id' => $id,
                  'name' => $name,
              ];
          }
  
          return [
              'options' => $categoryoptions,
              'warnings' => $warnings
          ];
      }
code_tokens: public static function get_category_options ( $ includeinherit , $ includenotset ) { $ warnings = [ ] ; $ params = self :: validate_parameters ( self :: get_category_options_parameters ( ) , [ 'includeinherit' => $ includeinherit , 'includenotset' => $ includenotset ] ) ; $ includeinherit = $ params [ 'includeinherit' ] ; $ includenotset = $ params [ 'includenotset' ] ; $ context = context_system :: instance ( ) ; self :: validate_context ( $ context ) ; api :: check_can_manage_data_registry ( ) ; $ categories = api :: get_categories ( ) ; $ options = data_registry_page :: category_options ( $ categories , $ includenotset , $ includeinherit ) ; $ categoryoptions = [ ] ; foreach ( $ options as $ id => $ name ) { $ categoryoptions [ ] = [ 'id' => $ id , 'name' => $ name , ] ; } return [ 'options' => $ categoryoptions , 'warnings' => $ warnings ] ; }
docstring: Fetches a list of data category options containing category IDs as keys and the category name for the value.
  
  @param bool $includeinherit Whether to include the "Inherit" option.
  @param bool $includenotset Whether to include the "Not set" option.
  @return array
docstring_tokens: Fetches a list of data category options containing category IDs as keys and the category name for the value .