Download the PHP package revaycolizer/data-display without Composer
On this page you can find all versions of the php package revaycolizer/data-display. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download revaycolizer/data-display
More information about revaycolizer/data-display
Files in revaycolizer/data-display
Package data-display
Short Description The DataDisplay class is a dynamic PHP data table renderer built with Sweet Alert and Bootstrap. It supports adding, editing, deleting, searching, joining tables, and pagination โ all from a fluent interface.
License MIT
Informations about the package data-display
๐ DataDisplay Component
The DataDisplay class is a dynamic PHP data table renderer built with Sweet Alert and Bootstrap. It supports adding, editing, deleting, searching, joining tables, and pagination โ all from a fluent interface.
โจ Features
๐ Dynamic table rendering with Bootstrap
๐ Searchable columns with support for input/select types
๐ CRUD Operations With Permissions
๐ Editable records with modals
โ Add new records using modals
โ Delete functionality with confirmation
๐ Supports JOINs
๐ Pagination support
๐ CSRF protection
Instantiate the Component Using Doctrine For Data Fetching
Instantiate the Component Using Classes For Data fetching
Provide The Method Which Will be Used in Fetching Data When Using Classes
Provide The Method With It's Parameters Which Will be Used in Fetching Data When Using Classes
DataDisplay Modes
Mode 1: Default
By Default the mode is Default There is no Need to Set Mode
Mode 2: Report
If mode is set to report it will remove the CRUD Buttons(Add,Edit & Delete)
Action Button Modes
Default
Dropdown
๐ง Configuration
Set Columns to Add
Set Columns to Edit
Set Add Permission
It takes a boolean value
Set Actions Button(Add,Edit,Delete)
By default All Buttons are enabled
Add Action using Input
Edit Action Using Input
Delete Action
SweetAlert Delete Title
SweetAlert Delete Message
Set BootStrap Version
By Default It uses BootStrap 5
Set SweetAlert Vision
By default it Uses SweetAlert 2
For those Getting DataTable Initialization Error
set Datatable Buttons
Select Fields and JOINs
Values to Render
If there are no Values to Render, it uses the Values to Select as a Fallback to render the items
Edit Button Conditions
You can decide to not specify the group operator which by default it will use AND operator as a fallback
Specifying Group Operator
How to Set Conditions:
Case 1: Simple OR condition (Conditions connected by OR):
This will return true if either name is equal to 'rrrooo' OR price is equal to 566.
Case 2: Simple AND condition (Conditions connected by AND):
This will return true if both name is equal to 'rrrooo' AND price is equal to 566.
Case 3: Mixed AND and OR (More complex logic with groups):
This will evaluate like:
(name = 'rrrooo' AND price = '566')
OR
(stock > 100 OR category = 'Electronics')
The overall result will be true if either the AND group (name and price) is true AND the OR group (stock or category) is true.
Edit Callback Function
Instead of using setEditButtonCondition You can opt to use setEditButtonConditionCallback to provide your own callback
Delete Button Conditions
You can decide to not specify the group operator which by default it will use AND operator as a fallback
Specifying Group Operator
How to Set Conditions:
Case 1: Simple OR condition (Conditions connected by OR):
This will return true if either name is equal to 'rrrooo' OR price is equal to 566.
Case 2: Simple AND condition (Conditions connected by AND):
This will return true if both name is equal to 'rrrooo' AND price is equal to 566.
Case 3: Mixed AND and OR (More complex logic with groups):
This will evaluate like:
(name = 'rrrooo' AND price = '566')
OR
(stock > 100 OR category = 'Electronics')
The overall result will be true if either the AND group (name and price) is true AND the OR group (stock or category) is true.
Delete Callback Function
Instead of using setEditButtonCondition You can opt to use setEditButtonConditionCallback to provide your own callback
File Import and Template using Form Action
Import DownloadLabel and Import TemplateName are Optional
File Import and Template using Input Action
Import DownloadLabel and Import TemplateName are Optional
Custom Add Form
Custom Add Form Header/Title
Custom Edit Form
THe id Of Inputs Should have the datatable id passed eg dataTable_editModalprice
Where dataTable is the id of datatable
Custom Edit Form With Select
Custom Edit Form Header/Title
Dialog Size
Add Dialog Size
Edit Dialog Size
Actions button Mode
DropDown
Default
View Source Modes
Link
Modal
Custom View Form Header
Values To Show On View Modal
View Dialog Size
Enable Search
Custom Columns Before Actions Columns
Custom Columns Before Actions Columns Without Being Escaped
Custom Columns Before Actions Columns With Callback Visibility
Custom Columns Before Actions Columns With Boolean Visibility
Custom Columns After Actions Columns
Custom Columns After Actions Columns Without Being Escaped
Custom Columns After Actions Columns With Callback Visibility
Custom Columns After Actions Columns With Boolean Visibility
Data Transformation
Enable Pagination
๐ฅ Rendering the Table
๐งผ Handling Form Submissions
โ Example a Simple Workflow Without Joins
Columns to add and Columns to Edit support using both associative and indexed array