original_string: public static function create_category($component, $area, $itemid) {
          $params = self::validate_parameters(self::create_category_parameters(),
              ['component' => $component, 'area' => $area, 'itemid' => $itemid]);
  
          $handler = \core_customfield\handler::get_handler($params['component'], $params['area'], $params['itemid']);
          self::validate_context($handler->get_configuration_context());
          if (!$handler->can_configure()) {
              throw new moodle_exception('nopermissionconfigure', 'core_customfield');
          }
          return $handler->create_category();
      }
code: public static function create_category($component, $area, $itemid) {
          $params = self::validate_parameters(self::create_category_parameters(),
              ['component' => $component, 'area' => $area, 'itemid' => $itemid]);
  
          $handler = \core_customfield\handler::get_handler($params['component'], $params['area'], $params['itemid']);
          self::validate_context($handler->get_configuration_context());
          if (!$handler->can_configure()) {
              throw new moodle_exception('nopermissionconfigure', 'core_customfield');
          }
          return $handler->create_category();
      }
code_tokens: public static function create_category ( $ component , $ area , $ itemid ) { $ params = self :: validate_parameters ( self :: create_category_parameters ( ) , [ 'component' => $ component , 'area' => $ area , 'itemid' => $ itemid ] ) ; $ handler = \ core_customfield \ handler :: get_handler ( $ params [ 'component' ] , $ params [ 'area' ] , $ params [ 'itemid' ] ) ; self :: validate_context ( $ handler -> get_configuration_context ( ) ) ; if ( ! $ handler -> can_configure ( ) ) { throw new moodle_exception ( 'nopermissionconfigure' , 'core_customfield' ) ; } return $ handler -> create_category ( ) ; }
docstring: Create category function
  
  @param string $component
  @param string $area
  @param int    $itemid
  @return mixed
docstring_tokens: Create category function