Function __global->_finish_comcode_table_row

Definitions

sources/comcode_compiler_tabular.php

  • Finish off a table cell (if currently open), a table row (if currently open and non-empty) and start a new row.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
&$tabular_rows array Yes No required parameter N/A N/A Tabular rows (passed by reference)
&$cells array Yes No required parameter N/A N/A Cells of current row (passed by reference)
&$current_cell ?string Yes No required parameter N/A N/A Current cell contents (passed by reference) (null: no current cell)
&$current_cell_header ?boolean Yes No required parameter N/A N/A Whether the current cell is a header cell (passed by reference) (null: no current cell)
$tabular_column_sizes array No No required parameter N/A N/A Sizes for the columns of each row (does not need to be all of them)
$source_member MEMBER No No required parameter N/A N/A The member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully
$as_admin boolean No No required parameter N/A N/A Whether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
$pass_id ?string No No required parameter N/A N/A A special identifier that can identify this resource in a sea of our resources of this class; usually this can be ignored, but may be used to provide a binding between JavaScript in evaluated Comcode, and the surrounding environment (null: no explicit binding)
$db ?object No No required parameter N/A N/A The database connector to use (null: none; only do this for very simple Comcode)
$_flags integer No No 0 N/A N/A A bitmask of COMCODE_* flags
$highlight_bits array No No [] N/A N/A A list of words to highlight
$on_behalf_of_member ?MEMBER No No Null N/A N/A The member we are running on behalf of, with respect to how attachments are handled; we may use this members attachments that are already within this post, and our new attachments will be handed to this member (null: member evaluating)

Preview

Code (PHP)

/**
 * Finish off a table cell (if currently open), a table row (if currently open and non-empty) and start a new row.
 *
 * @param  array $tabular_rows Tabular rows (passed by reference)
 * @param  array $cells Cells of current row (passed by reference)
 * @param  ?string $current_cell Current cell contents (passed by reference) (null: no current cell)
 * @param  ?boolean $current_cell_header Whether the current cell is a header cell (passed by reference) (null: no current cell)
 * @param  array $tabular_column_sizes Sizes for the columns of each row (does not need to be all of them)
 * @param  MEMBER $source_member The member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully
 * @param  boolean $as_admin Whether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
 * @param  ?string $pass_id A special identifier that can identify this resource in a sea of our resources of this class; usually this can be ignored, but may be used to provide a binding between JavaScript in evaluated Comcode, and the surrounding environment (null: no explicit binding)
 * @param  ?object $db The database connector to use (null: none; only do this for very simple Comcode)
 * @param  integer $_flags A bitmask of COMCODE_* flags
 * @param  array $highlight_bits A list of words to highlight
 * @param  ?MEMBER $on_behalf_of_member The member we are running on behalf of, with respect to how attachments are handled; we may use this members attachments that are already within this post, and our new attachments will be handed to this member (null: member evaluating)
 */

function _finish_comcode_table_row(array &$tabular_rows, array &$cells, ?string &$current_cell, ?bool &$current_cell_header, array $tabular_column_sizes, int $source_member, bool $as_admin, ?string $pass_id, ?object $db, int $_flags = 0, array $highlight_bits = [], ?int $on_behalf_of_member = null)