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