original_string: public static function read_template($id) {
          global $PAGE;
  
          $params = self::validate_parameters(self::read_template_parameters(), array('id' => $id));
          $template = api::read_template($params['id']);
          self::validate_context($template->get_context());
          $output = $PAGE->get_renderer('core');
  
          $exporter = new template_exporter($template);
          $record = $exporter->export($output);
          return $record;
      }
code: public static function read_template($id) {
          global $PAGE;
  
          $params = self::validate_parameters(self::read_template_parameters(), array('id' => $id));
          $template = api::read_template($params['id']);
          self::validate_context($template->get_context());
          $output = $PAGE->get_renderer('core');
  
          $exporter = new template_exporter($template);
          $record = $exporter->export($output);
          return $record;
      }
code_tokens: public static function read_template ( $ id ) { global $ PAGE ; $ params = self :: validate_parameters ( self :: read_template_parameters ( ) , array ( 'id' => $ id ) ) ; $ template = api :: read_template ( $ params [ 'id' ] ) ; self :: validate_context ( $ template -> get_context ( ) ) ; $ output = $ PAGE -> get_renderer ( 'core' ) ; $ exporter = new template_exporter ( $ template ) ; $ record = $ exporter -> export ( $ output ) ; return $ record ; }
docstring: Read a learning plan template by id.
  
  @param int $id The id of the template.
  @return \stdClass
docstring_tokens: Read a learning plan template by id .