Skip to content

BoardTerm Model ​

DB Table Name{wp_db_prefix}fbs_board_terms
SchemaCheck Schema
Source Filefluent-boards/app/Models/BoardTerm.php
Name SpaceFluentBoards\App\Models
ClassFluentBoards\App\Models\BoardTerm

BoardTerm is the base model for the rows in fbs_board_terms. It has no global scope, so it sees stages, labels and custom fields together. In most cases use one of the subclasses:

Subclasstype value
Stagestage
Labellabel
CustomFieldcustom-field

You can extend BoardTerm to store your own kind of per-board term.

Attributes ​

AttributeData TypeComment
idINT UNSIGNEDPrimary key
board_idINT UNSIGNEDBoard ID
titleVARCHAR(100) NULLTitle
slugVARCHAR(100) NULLSlug
typeVARCHAR(50)stage, label or custom-field
positionDECIMAL(10,2)Sort position
colorVARCHAR(50) NULLText color
bg_colorVARCHAR(50) NULLBackground color
settingsTEXT NULLSerialized; returned as an array
archived_atTIMESTAMP NULLArchive time
created_atTIMESTAMP NULL
updated_atTIMESTAMP NULL

Fillable: board_id, title, slug, type, position, settings, color, bg_color, archived_at, updated_at.

Settings are merged

Assigning settings merges the new keys into the stored settings instead of replacing them. Use replaceSettings() to overwrite the whole array.

Usage ​

Please check Model Basic for common methods.

php
$term = FluentBoards\App\Models\BoardTerm::find(5);

$term->type;     // "label"
$term->settings; // array

Relations ​

board ​

  • Returns FluentBoards\App\Models\Board
php
$board = $term->board;

Methods ​

replaceSettings($settings) ​

Replaces the whole settings array (the normal setter merges). Call save() afterwards.

  • Returns BoardTerm (for chaining)
php
$term->replaceSettings(['default_task_status' => 'open'])->save();