API and Functions list
Function name | Small description |
---|---|
addFields | The fields that will be visible to the end user for add/insert form. |
cloneFields | The fields that will be visible to the end user for clone form. |
columns | Specifying the fields that the end user will see as the datagrid columns. |
displayAs | Displaying the field name with a more readable label to the end-user. |
editFields | The fields that will be visible to the end user for edit/update form. |
fieldType | Changing the default field type from the database to fit to our needs. |
fields | This function is really just a facade function to call all the 4 functions at once: addFields, editFields, readFields and cloneFields. |
getState | Simply get the current state name as a string. |
getStateInfo | Get all the information about the current state. |
readFields | The fields that will be visible when the end-user navigates to the view form. |
render | This is the most basic function. In other words this means “make it work”. |
requiredFields | The most common validation. Checks is the field provided by the user is empty. |
setActionButton | Adding extra action buttons to the rows of the datagrid. |
setAdd | Setting the insert functionality. This function is rare to use as the default is already enabled. |
setApiUrlPath | Change the default API URL path and instead use the provided URL. Useful when we use Routes. |
setClone | Enabling the clone functionality for the datagrid. Clone is basically copying all the data to an insert form. |
setDelete | Set the delete functionality. This function is rare to use as the default is already enabled. |
setEdit | Set the update functionality. This function is rare to use as the default is already enabled. |
setExport | Set the export functionality. This function is rare to use as the default is already enabled. |
setLangString | Change any handle of the translation. |
setLanguage | Set the language of the CRUD. All the languages that Grocery CRUD supports are listed at the Languages Support section. |
setModel | Changing the default model with a custom one. |
setPrimaryKey | Set manually the primary key for a table. |
setPrint | Setting the print functionality. This function is rare to use as the default is already enabled. |
setRead | In order to enable the “View” button at your grid you will need to use the function setRead. The view of the form (read only) is false by default. |
setRelation | This is the function that is used to connect two tables with a 1 to n (1:n) relation. |
setRelationNtoN | A connection for 3 tables with n-n relation (also known as n:n or m:n). |
setRule | The setRule function is used to set a validation rule at the backend. Same as Codeigniter 4 setRule |
setSubject | Set a subject title for all the CRUD operations for the current CRUD. |
setTable | This is the database table that the developer will use to create the CRUD. |
setTexteditor | Specifying the fields that will open with a texteditor (ckeditor). |
setTheme | The setTheme is used in order to change the default theme (flexigrid). |
uniqueFields | Check if the data for the specified fields are unique. This is used at the insert and the update operation. |
unsetAdd | Removing the insert functionality at the current CRUD. |
unsetAddFields | Unset (do not display) the specified fields for the insert form. |
unsetBackToDatagrid | Unsets everything that has to do with buttons or links with go back to datagrid message. Currently only available for community version. |
unsetBootstrap | Do not load Bootstrap CSS. This is used when the Bootstrap CSS is already loaded at the template. |
unsetClone | The method unsetClone is removing completely the Clone operation for the end-user. |
unsetCloneFields | Unset (do not display) the specified fields from the clone form. |
unsetColumns | Unset (do not display) the specified columns. |
unsetDelete | Unset and do not display the delete functionality Also unsetting the delete multiple functionality. |
unsetEdit | Removing the edit operation for the end-user (from the frontend and the backend) |
unsetEditFields | Unset (do not display) the specified fields for the update form. |
unsetExport | Removing the export functionality for the current CRUD. |
unsetFields | Unset (do not display) the specified fields for insert, update, clone and view form. This method is simply combining the methods: unsetAddFields, unsetEditFields, unsetCloneFields, unsetReadFields. |
unsetJquery | Do not load jQuery. This is used when jQuery is already loaded at the template. |
unsetJqueryUi | Do not load jQuery UI. This is used when the jQuery UI (CSS and JS) is already loaded at the template. |
unsetOperations | Removing all the permissions for any operation (expect print and export) for the end-user. |
unsetPrint | The method unsetPrint is removing completely the Print operation for the end-user. |
unsetRead | The method unsetRead is removing completely the Read operation for the end-user. |
unsetReadFields | Unset (do not display) the specified fields for the view (read only) form. |
unsetTexteditor | Unsets the texteditor for the selected fields. This function is really rare to use as by default there is not any load of the texteditor for optimising purposes. |
where | Filter the queries with an extra where statement. |
Function name | Small description |
---|---|
callbackAddField | A callback that is used in case you need to create a custom field for the add form. |
callbackAfterDelete | The callback that will be used right after the delete. |
callbackAfterInsert | The callback that will be used right after the insert of the data. |
callbackAfterUpdate | The callback that will be used right after the update of the data. |
callbackBeforeDelete | The callback will be triggered before the delete functionality. |
callbackBeforeInsert | The callback is used in cases we need to add or change data before the insert functionality. |
callbackBeforeUpdate | The callback is used in cases we need to add or change data before the update functionality. |
callbackCloneField | A callback that is used in case you need to create a custom field for the clone form. |
callbackColumn | The method callbackColumn is the transformation of the data for a column at the datagrid. |
callbackDelete | The basic usage of callbackDelete is when we want to replace the default delete functionality. |
callbackEditField | A callback that is used in case you need to create a custom field for the edit/update form. |
callbackInsert | The callback is used when we need to replace the default functionality of the insert. |
callbackReadField | This is a callback in order to create a custom field at the read/view form. |
callbackUpdate | The callback is used when we need to replace the default update functionality. |
Function name | Small description |
---|---|
defaultOrdering | The default ordering that the datagrid will have before the user will press any button to order by column. |
setRules | setRules method combines multiple setRule methods into one. |
setActionButtonMultiple | Action button for multiple selections with checkboxes. |
setSkin | Choose between two skins: Bootstrap v3 and Bootstrap V4. |
unsetFilters | Removing the "Filters" button from the datagrid. |
unsetSearchColumns | Unset the search on the datagrid from quick column search and from filtering. |
unsetSettings | Removing the "Settings" button from the datagrid. |
callbackAfterDeleteMultiple | The callback that will be used right after the multiple delete functionality. |
callbackBeforeDeleteMultiple | Similar functionality with callbackBeforeDelete it is just that this callback will be used for the delete multiple functionality. |
callbackDeleteMultiple | Replaces the default multiple delete functionality with the callback specified. |
callbackReadForm | A callback to change the read data that will display at the read/view modal. |
callbackEditForm | This callback is used in case we need to append, filter or change the data that are going to appear on the edit form. |
setDeleteMultiple | The setDeleteMultiple method is rarely used as the multiple delete functionality is enabled by default. |
unsetDeleteMultiple | This function is used when you don't want the user to have the ability to batch remove too many records at once. Have in mind that the user can remove rows one by one. |
readOnlyAddFields | There are cases, that we need some fields to be read only but only to the add form modal. |
readOnlyCloneFields | There are cases, that we need some fields to be read only but only to the clone form modal. |
readOnlyEditFields | There are cases, that we need some fields to be read only but only to the edit form modal. |
readOnlyFields | Specifying the fields that can't be edited and will only be viewed. |
callbackAfterUpload | The callback that will be triggered right after the upload. |
callbackAfterUpload | The callback that will be triggered right after the upload. |
callbackBeforeUpload | The callback is used in cases we need to filter the uploaded data before the upload functionality. |
callbackUpload | The callbackUpload is used when we need to replace the default upload functionality of Grocery CRUD Enterprise. |
setFieldUpload | There is a special type of field for uploading data or images and in order to trigger this type, you will need to use the setFieldUpload method. |
setFieldUploadMultiple | Multiple Uploads functionality in one field with comma separated values. |
setCsrfTokenName | Specify the token name for CSRF protection. |
setCsrfTokenValue | Specify the token value for CSRF protection. |
setDatabaseSchema | Set the database schema (currently only tested on PostgresSQL databases). |
setDependentRelation | There are cases that dropdown list that was built from setRelation has dependencies between them. |
setSequenceName | Postgres database is recognising the insert id with a sequence key. |
fieldTypeAddForm | This function is used for cases that you need to change the field type but only for the add/insert form. |
fieldTypeCloneForm | This function is used for cases that you need to change the field type but only for the Clone form. |
fieldTypeColumn | This function is used for cases that you need to change the field type but only for the datagrid column. |
fieldTypeEditForm | This function is used for cases that you need to change the field type but only for the edit/update form. |
fieldTypeFormFields | This function is really just a facade function to call all the functions of field-types for the form data. |
fieldTypeReadForm | This function is used when you need to change the field type but only for the read/view form. |
setFieldBlob | Enable the upload functionality for Blob field type. |
setConfig | Quickly set a configuration name that will be specific for your CRUD. |
setLanguagePath | setLanguagePath is used in order to change the default path of the language folder. |
setThemePath | The method setThemePath is used when we want to change the folder of the theme. |