You are here

function tablefield_content_is_empty in TableField 6

Implementation of hook_content_is_empty().

1 call to tablefield_content_is_empty()
tablefield_process in ./tablefield.module
Process the tablefield

File

./tablefield.module, line 151
This module provides a set of fields that can be used to store tabular data with a node. The implementation uses a custom CCK widget.

Code

function tablefield_content_is_empty($item, $field) {

  // Remove the preference fields to see if the table cells are all empty
  unset($item['tablefield']['count_cols']);
  unset($item['tablefield']['count_rows']);
  unset($item['tablefield']['rebuild']);
  if (!empty($item['tablefield'])) {
    foreach ($item['tablefield'] as $cell) {
      if (!empty($cell)) {
        return FALSE;
      }
    }
  }
  return TRUE;
}