Brimbox Logo Brimbox Version 2.3.4 Released

Extendables and Pluggables>>

Brimbox comes with a dozen extendable and pluggable functions, classes and codeblocks. The default extendable codeblocks are in the bb-blocks directory and the pluggable functions and class are stored in bb-pluggables.

Extendable codebocks by default deal with login functionality or the initialization of the controller. To extend a codeblock simply place an alternative codeblock in the bb-extend directory with the same name as the file in the bb-blocks directory. The controller checks for the existence of the file in the bb-extend directory and gives it priority rather than the default function in the bb-blocks directory. If it is desired to customize the login form, like with company colors, place a customized bb_login_form.php file with the same name in the bb-extend directory.

Note: you can validate a user with an alternative user validation and verification process by altering bb_login_form.php and bb_verify_login.php if you can get the userrole or userroles defined.

The six extendable functions are:

  • bb_include_main_class.php — the extended bb_main class include.
  • bb_login_form.php — the mostly HTML login form.
  • bb_login_reset_mailer.php — the code involved in sending reset emails.
  • bb_login_styles.php — the CSS styles for login form customization.
  • bb_login_verification.php — the default PHP code to verify login credentials.
  • bb_parse_globals.php — the parse global array and include function modules and files.

The pluggable functions (and class) are included only if not previously defined, so there is a function_exists() call before the functions are included. Except for the bb_index_hot_state() function all the other default pluggable functions are used in the “Input” module, and are included only when the “Input” module hook they are attached to is executed. All the “Input” pluggables can be defined anywhere preceding the “Input” module for a substitution. The hot state pluggable is called right before the interface rendering codeblock is included, after the main class and the global array and functions extendable codeblocks are included.

Note: the eight pluggable functions are by default hooked in bb-utilities/bb_arrays.php.

The nine pluggable functions are:

  • bb_data_table_render_form.php — “Input” form rendering function.
  • bb_data_table_row_input.php — “Input” and “Upload Data” insert and update database function.
  • bb_data_table_row_validate.php — “Input” and “Upload Data” data validation function.
  • bb_index_hot_state.php — Hot State pluggable function.
  • bb_input_module_autofill.php — Autofill hook pluggable function.
  • bb_input_module_hooks.php — Input module class for before and after form render hooks.
  • bb_input_module_postback.php — Process postback on “Input” module.
  • bb_input_redirect_postback.php — Process postback on “Input” post routine when inserting or updating data.
  • bb_join_table_row_input.php — Input module for adding join relationships to the join_table.

Updated: 2017-07-22

Documents

Definitions