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
array $themeConfig
array $yat_card_modal_buttons
$mobileDetailsModalOpen
$mobileDetailsRow
$showOptionsOnlyOnRowSelect
$layout
$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
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.

showCardsOnMobile(bool $bool = true)

No description

useCards(bool $bool = true)

No description

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 125
void setTheme(string $theme)

Set the table theme.

Parameters

string $theme

Return Value

void

at line 137
array getThemeConfig(string $theme)

Get configuration for a specific theme from presets.

Parameters

string $theme

Return Value

array

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

Override the bulk actions theme.

Parameters

string|null $theme

Return Value

void

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

Override the button theme.

Parameters

string|null $theme

Return Value

void

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

Override specific theme settings.

Parameters

string|null $theme

Return Value

void

at line 181
void mountView()

Initialize view settings.

Return Value

void

at line 193
void gatherEnvData()

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

Return Value

void

at line 207
void addButtons(array $buttons)

Add custom buttons to the table header.

Parameters

array $buttons

Return Value

void

at line 223
void addCardModalButtons(array $buttons)

Add buttons to the card modal view.

Parameters

array $buttons

Return Value

void

at line 234
void showCounter(bool $bool)

Toggle the record counter display.

Parameters

bool $bool

Return Value

void

at line 239
showCardsOnMobile(bool $bool = true)

No description

Parameters

bool $bool

at line 244
useCards(bool $bool = true)

No description

Parameters

bool $bool

at line 258
void openMobileCardDetails(mixed $rowId)

Open the mobile details modal for a specific row.

Parameters

mixed $rowId

Return Value

void

at line 269
void closeMobileCardDetails()

Close the mobile details modal.

Return Value

void

at line 281
void setTitle(string $title)

Set the table title.

Parameters

string $title

Return Value

void

at line 292
void overrideTitleClasses(string $classes)

Override default title classes.

Parameters

string $classes

Return Value

void

at line 303
void setCustomHeader(string $html)

Set custom HTML content for the header.

Parameters

string $html

Return Value

void

at line 314
void setComponentClasses(string $classes)

Set CSS classes for the main component wrapper.

Parameters

string $classes

Return Value

void

at line 325
void addTableClasses(string $classes)

Add CSS classes to the table element.

Parameters

string $classes

Return Value

void

at line 336
void setTableClasses(string $classes)

Set (overwrite) CSS classes for the table element.

Parameters

string $classes

Return Value

void

at line 347
void setStickyHeader()

Enable sticky header for the table.

Return Value

void

at line 360
void setModalsView(string $view)

Set the view for modals.

Parameters

string $view

Return Value

void

at line 371
void setMostLeftView(string $view)

Set the view for the leftmost header area.

Parameters

string $view

Return Value

void

at line 382
void setLessLeftView(string $view)

Set the view for the inner left header area.

Parameters

string $view

Return Value

void

at line 393
void setMostRightView(string $view)

Set the view for the rightmost header area.

Parameters

string $view

Return Value

void

at line 404
void setLessRightView(string $view)

Set the view for the inner right header area.

Parameters

string $view

Return Value

void

at line 415
void setButtonVariant(string $variant)

Set the button variant style.

Parameters

string $variant

Return Value

void

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

Configure options visibility based on row selection specific logic.

Parameters

bool $value

Return Value

void

at line 441
void setLayout(mixed $layout)

Set the main layout view.

Parameters

mixed $layout

Return Value

void

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

Enable or disable striped rows.

Parameters

bool $strip

Return Value

void

at line 464
string getRowStripingClasses()

Get the CSS classes for row striping based on configuration.

Return Value

string