Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Bodycopy_Table_Edit_Fns Class Reference
Inheritance diagram for Bodycopy_Table_Edit_Fns:
Bodycopy_Container_Edit_Fns Asset_Edit_Fns MySource_Object

Public Member Functions

 __construct ()
 
 paintBackendJsData (Bodycopy_Table $asset, $prefix)
 
 paintGenericBackend (Asset $bodycopy, Backend_Outputter $o, $prefix)
 
 paint (Bodycopy_Table $asset, $editing=FALSE, $generating=FALSE)
 
 paintContainer (Bodycopy_Table $asset, Backend_Outputter $o, $prefix)
 
 processContainer (Bodycopy_Table $asset, Backend_Outputter $o, $prefix, $bc_action, $bc_name, Array $bc_data, Array $bc_saved)
 
 insertRow (Bodycopy_Table $asset, $rowid, $before=TRUE)
 
 deleteRow (Bodycopy_Table $asset, $rowid)
 
 reorderRows (Bodycopy_Table $asset, Array $row_order)
 
 reorderColumns (Bodycopy_Table $asset, Array $col_order)
 
 insertColumn (Bodycopy_Table $asset, $cellid, $before=TRUE)
 
 deleteColumn (Bodycopy_Table $asset, $cellid)
 
 insertCell (Bodycopy_Table $asset, Array &$rows, $rowid, $cellid, $before=TRUE, $colspan=FALSE)
 
 deleteCell (Bodycopy_Table $table, Array &$rows, $rowid, $cellid, $colspan=FALSE)
 
 maxCols ($table_rows, $add_colspans=TRUE)
 
- Public Member Functions inherited from Bodycopy_Container_Edit_Fns
 __construct ()
 
 setAttribute (Array &$attributes, $name, $value)
 
 paintBackendJsData (Bodycopy_Container $asset, $prefix)
 
 paintGenericBackend (Bodycopy_Container $asset, Backend_Outputter $o, $prefix)
 
 paint (Bodycopy_Container $asset, $editing=FALSE, $generating=FALSE)
 
 paintContainer (Bodycopy_Container $asset, Backend_Outputter $o, $prefix)
 
 processContainer (Bodycopy_Container $asset, Backend_Outputter $o, $prefix, $bc_action, $bc_name, Array $bc_data, Array $bc_saved)
 
 generateContentFile (Bodycopy_Container $asset)
 
 createContentLinks (Bodycopy_Container $asset, $output=NULL)
 
 _contentsUpdated (Bodycopy_Container $asset)
 
 paintBodycopyContainer (Bodycopy_Container $asset, Backend_Outputter $o, $prefix)
 
- Public Member Functions inherited from Asset_Edit_Fns
 Asset_Edit_Fns ()
 
 paintPaths (&$asset, &$o, $prefix)
 
 paintEditRemapURLs (&$asset, &$o, $prefix)
 
 processPaths (&$asset, &$o, $prefix)
 
 processEditRemapURLs (&$asset, &$o, $prefix)
 
 paintURLs (&$asset, &$o, $prefix)
 
 paintAddRemapURLs (&$asset, &$o, $prefix)
 
 processAddRemapURLs (&$asset, &$o, $prefix)
 
 isWorkflowComplete (&$asset)
 
 paintNoticeLinkedAsset (&$asset, $link_value, $type_codes=Array(), $field_name='', $multiple=FALSE)
 
 processNoticeLinkedAsset (&$asset, $link_value, $field_name='', $multiple=FALSE)
 
 isSearchInstalled (&$asset, $prefix)
 
 isBeingCreated (&$asset)
 
 isNotBeingCreated (&$asset)
 
 paintAutomaticRemapSetting (&$asset, &$o, $prefix)
 
 paintCreateLink (&$asset, &$o, $prefix)
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Protected Member Functions

 _paintEditingCell (Bodycopy_Table $asset, $prefix, $x, $i, &$cell, $multiCol, $multiRow, $colReorder)
 
- Protected Member Functions inherited from Bodycopy_Container_Edit_Fns
 _saveCssIds (Backend_Outputter $o)
 

Additional Inherited Members

- Data Fields inherited from Bodycopy_Container_Edit_Fns
position __pad0__:absolute
 
width __pad1__: 1px
 
height __pad2__: 1px
 
visibility __pad3__: hidden
 

Detailed Description

Definition at line 30 of file bodycopy_table_edit_fns.inc.

Constructor & Destructor Documentation

__construct ( )

Constructor

Definition at line 38 of file bodycopy_table_edit_fns.inc.

Member Function Documentation

_paintEditingCell ( Bodycopy_Table  $asset,
  $prefix,
  $x,
  $i,
$cell,
  $multiCol,
  $multiRow,
  $colReorder 
)
protected

Output a single cell from the table. Checks the cell's position in the table and draws extra icons as needed (ie the reorder columns/rows, table properties etc).

the editing cells are made up of 4 regions;

  • Top left that is blank except for the first cell which contains a table editing icon
  • Top right which contains editing icons for the cell and column
  • Bottom left which contains row editing icons
  • Bottom right which contains the actual cell contents.
Parameters
Bodycopy_Table$assetThe parent table asset being edited
string$prefixThe prefix for this asset in a form
int$xThe x coordinate of this cell
int$iThe y coordinate of this cell
int&$cellThe cell being drawn.
boolean$multiColAre there more than 1 cols in the table?
boolean$multiRowAre there more than 1 rows in the table?
boolean$colReorderAre we allowed to reorder columns? (colspan issues).
Returns
void private

Definition at line 444 of file bodycopy_table_edit_fns.inc.

deleteCell ( Bodycopy_Table  $table,
Array &  $rows,
  $rowid,
  $cellid,
  $colspan = FALSE 
)

Delete the passed table cell from a row

Parameters
Bodycopy_Table&$tablethe table object
array&$rowsa reference to the rows attribute of the table
int$rowidthe ID of the row we are deleting from
int$cellidthe ID of the cell we are deleting
boolean$colspanignore colspans in this row
Returns
boolean public

Definition at line 1197 of file bodycopy_table_edit_fns.inc.

deleteColumn ( Bodycopy_Table  $asset,
  $cellid 
)

Deletes a column from all rows, before or after the passed columnID

Parameters
Bodycopy_Table$assetthe table object
int$cellidthe ID of the column that we are deleting
Returns
boolean public

Definition at line 1046 of file bodycopy_table_edit_fns.inc.

deleteRow ( Bodycopy_Table  $asset,
  $rowid 
)

Delete the passed table row from the array

Parameters
Bodycopy_Table$assetthe table object
int$rowidthe id of the row to delete
Returns
boolean public

Definition at line 889 of file bodycopy_table_edit_fns.inc.

insertCell ( Bodycopy_Table  $asset,
Array &  $rows,
  $rowid,
  $cellid,
  $before = TRUE,
  $colspan = FALSE 
)

Insert a new table cell before or after the passed cellID

Parameters
Bodycopy_Table$assetthe table object
array&$rowsa reference to the rows attribute of the table
int$rowidthe ID of the row we are inserting into
int$cellidthe ID of the cell we are inserting before/after
boolean$beforeinsert the cell before the passed cellID?
boolean$colspanignore colspans in this row
Returns
boolean public

Definition at line 1077 of file bodycopy_table_edit_fns.inc.

insertColumn ( Bodycopy_Table  $asset,
  $cellid,
  $before = TRUE 
)

Insert a new column in all rows, before or after the passed columnID

Parameters
Bodycopy_Table$assetthe table object
int$cellidthe ID of the column that we are inserting before/after
boolean$beforeinsert before the passed cellID?
Returns
boolean public

Definition at line 1019 of file bodycopy_table_edit_fns.inc.

insertRow ( Bodycopy_Table  $asset,
  $rowid,
  $before = TRUE 
)

Insert a new table row before or after the passed rowid

Parameters
Bodycopy_Table$assetthe table object
int$rowidthe id of the row that we are inserting before/after
boolean$beforeinsert before the passed rowid?
Returns
boolean public

Definition at line 829 of file bodycopy_table_edit_fns.inc.

maxCols (   $table_rows,
  $add_colspans = TRUE 
)

Gets the maximum number of columns out of all the rows in this table

Parameters
array$table_rowsthe rows attribute of the table
boolean$add_colspansadd colspan value while counting
Returns
int public

Definition at line 1269 of file bodycopy_table_edit_fns.inc.

paint ( Bodycopy_Table  $asset,
  $editing = FALSE,
  $generating = FALSE 
)

Paints this table as HTML

Parameters
object&$assetthe table whose interface we are painting
boolean$editingare we printing an editing interface
boolean$generatingare we generating the content file
Returns
void public

Definition at line 255 of file bodycopy_table_edit_fns.inc.

paintBackendJsData ( Bodycopy_Table  $asset,
  $prefix 
)

Prints the JavaScript needed by the backend functions for this table

Parameters
Bodycopy_Table$assetthe table object being printed
string$prefixprefix for form fields
Returns
void public

Definition at line 54 of file bodycopy_table_edit_fns.inc.

paintContainer ( Bodycopy_Table  $asset,
Backend_Outputter  $o,
  $prefix 
)

Paint the interface for editing this table

Parameters
Bodycopy_Table$assetthe table whose interface we are painting
Backend_Outputter$othe Backend Outputter class
string$prefixprefix for the form elements
Returns
boolean public

Definition at line 315 of file bodycopy_table_edit_fns.inc.

paintGenericBackend ( Asset  $bodycopy,
Backend_Outputter  $o,
  $prefix 
)

Paint JS data that tables need to use to do their processing

Parameters
Bodycopy_Table$bodycopythe bodycopy being printed
Backend_Outputter$othe Backend Outputter class
string$prefixprefix for the form element
Returns
void public

Definition at line 111 of file bodycopy_table_edit_fns.inc.

processContainer ( Bodycopy_Table  $asset,
Backend_Outputter  $o,
  $prefix,
  $bc_action,
  $bc_name,
Array  $bc_data,
Array  $bc_saved 
)

Process the interface for editing this table

Parameters
Bodycopy_Table$assetthe table whose interface we are painting
Backend_Outputter$othe Backend Outputter class
string$prefixprefix for the form element
string$bc_actiona global bodycopy action to perform (eg insert_table_row)
string$bc_namethe name of the bodycopy that submitted the action
array$bc_dataan array of data needed to perform the action
array$bc_savedany saved changes that were performed without committing
Returns
boolean public

Definition at line 591 of file bodycopy_table_edit_fns.inc.

reorderColumns ( Bodycopy_Table  $asset,
Array  $col_order 
)

Reorder the columns of this table

Parameters
Bodycopy_Table$assetthe table object
array$col_orderan array of the structure (new_place => old_place)
Returns
boolean public

Definition at line 977 of file bodycopy_table_edit_fns.inc.

reorderRows ( Bodycopy_Table  $asset,
Array  $row_order 
)

Reorder the rows of this table

Parameters
Bodycopy_Table$assetthe table object
array$row_orderan array of the structure (new_place => old_place)
Returns
boolean public

Definition at line 934 of file bodycopy_table_edit_fns.inc.


The documentation for this class was generated from the following file: