internal package Foswiki::Plugins::EditTablePlugin::EditTableData

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

getTableStatistics( $changesMap ) → \$statistics

Creates a 'statistics' hash that shows the result of applying changes to the EditTableData object:
  • {rowCount} : the total number of rows, including header and footer rows
  • {added} : the added rows
  • {deleted} : the deleted rows
  • {bodyRowCount} : the number of body rows

StaticMethod _mergeHashes (\%a, \%b ) → \%merged

Merges 2 hash references.

StaticMethod createTableChangesMap( $paramString ) → \%map

Parses the paramString to a hash. paramString can contain a list of key-value pairs using the structure (rowNumber_1=rowState_1,rowNumber_2=rowState_2,...), for example:

  1. =0,1=0,2=1

Row states are:
-1
row deleted
0
nothing changed
1
row added
2
reset (no action)

Not all rows have to be present in the param.

StaticMethod tableChangesMapToParamString( \%tableChanges ) → $paramString

In the reverse operation to createTableChangesMap, converts a tableChanges hash to a param string.

For example, { '0' => '0', '3' => '1' } will be converted to: '0=0,3=1'

StaticMethod _getTableChangeStatistics

Topic revision: r1 - 02 Mar 2020, UnknownUser
© 2020 Ultranauts - 75 Broad Street, 2nd Floor, Suite 206, New York, NY 10004 - info@ultranauts.co