original_string: public static function create_from_category($category) {
          $event = self::create(array(
              'objectid' => $category->id,
              'context' => \context_system::instance(),
              'other' => array(
                  'name' => $category->name,
              )
          ));
  
          $event->add_record_snapshot('user_info_category', $category);
  
          return $event;
      }
code: public static function create_from_category($category) {
          $event = self::create(array(
              'objectid' => $category->id,
              'context' => \context_system::instance(),
              'other' => array(
                  'name' => $category->name,
              )
          ));
  
          $event->add_record_snapshot('user_info_category', $category);
  
          return $event;
      }
code_tokens: public static function create_from_category ( $ category ) { $ event = self :: create ( array ( 'objectid' => $ category -> id , 'context' => \ context_system :: instance ( ) , 'other' => array ( 'name' => $ category -> name , ) ) ) ; $ event -> add_record_snapshot ( 'user_info_category' , $ category ) ; return $ event ; }
docstring: Creates an event from a profile info category.
  
  @since Moodle 3.4
  @param \stdClass $category A sna[pshot of the created category.
  @return \core\event\base
docstring_tokens: Creates an event from a profile info category .