trait View

Properties

string|null $title
string|null $titleClasses
string|null $customHeader
string|null $main_wrapper_classes
string|null $table_classes
bool $override_table_classes
bool $sticky_header
bool $has_counter
string|null $modals_view
string|null $yat_most_left_view
string|null $yat_less_left_view
string|null $yat_most_right_view
string|null $yat_less_right_view
bool $showCardsOnMobile
bool $useCards
bool $yat_is_mobile
array $yat_custom_buttons
string $yat_button_variant
string $theme
string|null $bulkThemeOverride
string|null $buttonThemeOverride
string|null $inputThemeOverride
string|null $componentSizeOverride
array $themeConfig
array $yat_card_modal_buttons
bool $mobileDetailsModalOpen
array $mobileDetailsRow
bool $showOptionsOnlyOnRowSelect
mixed $layout
bool $stripRows

Methods

void
setTheme(string $theme)

Set the table theme.

array
getThemeConfig(string $theme)

Get configuration for a specific theme from presets.

void
setBulkThemeOverride(string|null $theme)

Override the bulk actions theme.

void
setButtonThemeOverride(string|null $theme)

Override the button theme.

void
setInputThemeOverride(string|null $theme)

Override specific theme settings.

void
setComponentSize(string|null $size)

Override the size of all beartropy-ui components in the table header.

void
mountView()

Initialize view settings.

void
gatherEnvData()

Detect environmental data (e.g. mobile device).

void
addButtons(array $buttons)

Add custom buttons to the table header.

void
addCardModalButtons(array $buttons)

Add buttons to the card modal view.

void
showCounter(bool $bool)

Toggle the record counter display.

void
showCardsOnMobile(bool $bool = true)

Enable or disable card view on mobile devices.

void
useCards(bool $bool = true)

Enable or disable card layout for all devices.

void
openMobileCardDetails(mixed $rowId)

Open the mobile details modal for a specific row.

void
closeMobileCardDetails()

Close the mobile details modal.

void
setTitle(string $title)

Set the table title.

void
overrideTitleClasses(string $classes)

Override default title classes.

void
setCustomHeader(string $html)

Set custom HTML content for the header.

void
setComponentClasses(string $classes)

Set CSS classes for the main component wrapper.

void
addTableClasses(string $classes)

Add CSS classes to the table element.

void
setTableClasses(string $classes)

Set (overwrite) CSS classes for the table element.

void
setStickyHeader()

Enable sticky header for the table.

void
setModalsView(string $view)

Set the view for modals.

void
setMostLeftView(string $view)

Set the view for the leftmost header area.

void
setLessLeftView(string $view)

Set the view for the inner left header area.

void
setMostRightView(string $view)

Set the view for the rightmost header area.

void
setLessRightView(string $view)

Set the view for the inner right header area.

void
setButtonVariant(string $variant)

Set the button variant style.

void
showOptionsOnlyOnRowSelect(bool $value = true)

Configure options visibility based on row selection specific logic.

void
setLayout(mixed $layout)

Set the main layout view.

void
stripRows(bool $strip = true)

Enable or disable striped rows.

string
getRowStripingClasses()

Get the CSS classes for row striping based on configuration.

Details

at line 60
void setTheme(string $theme)

Set the table theme.

Parameters

string $theme

Return Value

void

at line 71
array getThemeConfig(string $theme)

Get configuration for a specific theme from presets.

Parameters

string $theme

Return Value

array

at line 83
void setBulkThemeOverride(string|null $theme)

Override the bulk actions theme.

Parameters

string|null $theme

Return Value

void

at line 93
void setButtonThemeOverride(string|null $theme)

Override the button theme.

Parameters

string|null $theme

Return Value

void

at line 103
void setInputThemeOverride(string|null $theme)

Override specific theme settings.

Parameters

string|null $theme

Return Value

void

at line 113
void setComponentSize(string|null $size)

Override the size of all beartropy-ui components in the table header.

Parameters

string|null $size

Return Value

void

at line 123
void mountView()

Initialize view settings.

Return Value

void

at line 135
void gatherEnvData()

Detect environmental data (e.g. mobile device).

Return Value

void

at line 148
void addButtons(array $buttons)

Add custom buttons to the table header.

Parameters

array $buttons

Return Value

void

at line 160
void addCardModalButtons(array $buttons)

Add buttons to the card modal view.

Parameters

array $buttons

Return Value

void

at line 170
void showCounter(bool $bool)

Toggle the record counter display.

Parameters

bool $bool

Return Value

void

at line 180
void showCardsOnMobile(bool $bool = true)

Enable or disable card view on mobile devices.

Parameters

bool $bool

Return Value

void

at line 190
void useCards(bool $bool = true)

Enable or disable card layout for all devices.

Parameters

bool $bool

Return Value

void

at line 205
void openMobileCardDetails(mixed $rowId)

Open the mobile details modal for a specific row.

Parameters

mixed $rowId

Return Value

void

at line 216
void closeMobileCardDetails()

Close the mobile details modal.

Return Value

void

at line 228
void setTitle(string $title)

Set the table title.

Parameters

string $title

Return Value

void

at line 239
void overrideTitleClasses(string $classes)

Override default title classes.

Parameters

string $classes

Return Value

void

at line 250
void setCustomHeader(string $html)

Set custom HTML content for the header.

Parameters

string $html

Return Value

void

at line 260
void setComponentClasses(string $classes)

Set CSS classes for the main component wrapper.

Parameters

string $classes

Return Value

void

at line 270
void addTableClasses(string $classes)

Add CSS classes to the table element.

Parameters

string $classes

Return Value

void

at line 280
void setTableClasses(string $classes)

Set (overwrite) CSS classes for the table element.

Parameters

string $classes

Return Value

void

at line 291
void setStickyHeader()

Enable sticky header for the table.

Return Value

void

at line 301
void setModalsView(string $view)

Set the view for modals.

Parameters

string $view

Return Value

void

at line 311
void setMostLeftView(string $view)

Set the view for the leftmost header area.

Parameters

string $view

Return Value

void

at line 321
void setLessLeftView(string $view)

Set the view for the inner left header area.

Parameters

string $view

Return Value

void

at line 331
void setMostRightView(string $view)

Set the view for the rightmost header area.

Parameters

string $view

Return Value

void

at line 341
void setLessRightView(string $view)

Set the view for the inner right header area.

Parameters

string $view

Return Value

void

at line 351
void setButtonVariant(string $variant)

Set the button variant style.

Parameters

string $variant

Return Value

void

at line 363
void showOptionsOnlyOnRowSelect(bool $value = true)

Configure options visibility based on row selection specific logic.

Parameters

bool $value

Return Value

void

at line 376
void setLayout(mixed $layout)

Set the main layout view.

Parameters

mixed $layout

Return Value

void

at line 388
void stripRows(bool $strip = true)

Enable or disable striped rows.

Parameters

bool $strip

Return Value

void

at line 398
string getRowStripingClasses()

Get the CSS classes for row striping based on configuration.

Return Value

string