You are here

public function webform_exporter::wrappable in Webform 7.4

Determines whether a cell is eligible for word-wrapping.

This is based upon position in file and the contents of cell.

Return true when the global word-wrapping option is enabled and the cell is anything other than the first column in either of the first two rows. By default, these rows are long and are intended to overlap the columns to the right. Also returns true when the cell contains a return character.

Parameters

int $row: Row number, counting from 0.

int $column: Column number, counting from 0.

string $value: The value of the cell.

Return value

bool Whether the cell position is eligible for wordwrapping.

1 call to webform_exporter::wrappable()
webform_exporter_excel_xlsx::add_row in includes/exporters/webform_exporter_excel_xlsx.inc
Add a single row to the export file.

File

includes/exporters/webform_exporter.inc, line 41

Class

webform_exporter
Base class defining the common methods available to exporters.

Code

public function wrappable($row, $column, $value) {
  return strpos($value, "\n") !== FALSE || $this->export_wordwrap && ($row > 2 || $column > 0 || $this->options['header_keys'] < 0);
}