original_string: public static function create_from_object(category_controller $category) : category_created {
          $eventparams = [
              'objectid' => $category->get('id'),
              'context'  => $category->get_handler()->get_configuration_context(),
              'other'    => ['name' => $category->get('name')]
          ];
          $event = self::create($eventparams);
          $event->add_record_snapshot($event->objecttable, $category->to_record());
          return $event;
      }
code: public static function create_from_object(category_controller $category) : category_created {
          $eventparams = [
              'objectid' => $category->get('id'),
              'context'  => $category->get_handler()->get_configuration_context(),
              'other'    => ['name' => $category->get('name')]
          ];
          $event = self::create($eventparams);
          $event->add_record_snapshot($event->objecttable, $category->to_record());
          return $event;
      }
code_tokens: public static function create_from_object ( category_controller $ category ) : category_created { $ eventparams = [ 'objectid' => $ category -> get ( 'id' ) , 'context' => $ category -> get_handler ( ) -> get_configuration_context ( ) , 'other' => [ 'name' => $ category -> get ( 'name' ) ] ] ; $ event = self :: create ( $ eventparams ) ; $ event -> add_record_snapshot ( $ event -> objecttable , $ category -> to_record ( ) ) ; return $ event ; }
docstring: Creates an instance from a category controller object
  
  @param category_controller $category
  @return category_created
docstring_tokens: Creates an instance from a category controller object