original_string: public static function reload_template($component, $area, $itemid) {
          global $PAGE;
  
          $params = self::validate_parameters(self::reload_template_parameters(),
                        ['component' => $component, 'area' => $area, 'itemid' => $itemid]);
  
          $PAGE->set_context(context_system::instance());
          $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');
          }
          $output = $PAGE->get_renderer('core_customfield');
          $outputpage = new \core_customfield\output\management($handler);
          return $outputpage->export_for_template($output);
      }
code: public static function reload_template($component, $area, $itemid) {
          global $PAGE;
  
          $params = self::validate_parameters(self::reload_template_parameters(),
                        ['component' => $component, 'area' => $area, 'itemid' => $itemid]);
  
          $PAGE->set_context(context_system::instance());
          $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');
          }
          $output = $PAGE->get_renderer('core_customfield');
          $outputpage = new \core_customfield\output\management($handler);
          return $outputpage->export_for_template($output);
      }
code_tokens: public static function reload_template ( $ component , $ area , $ itemid ) { global $ PAGE ; $ params = self :: validate_parameters ( self :: reload_template_parameters ( ) , [ 'component' => $ component , 'area' => $ area , 'itemid' => $ itemid ] ) ; $ PAGE -> set_context ( context_system :: instance ( ) ) ; $ 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' ) ; } $ output = $ PAGE -> get_renderer ( 'core_customfield' ) ; $ outputpage = new \ core_customfield \ output \ management ( $ handler ) ; return $ outputpage -> export_for_template ( $ output ) ; }
docstring: Reload template function
  
  @param string $component
  @param string $area
  @param int $itemid
  @return array|object|stdClass
docstring_tokens: Reload template function