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.
defaultOrdering The default ordering that the datagrid will have before the user will press any button to order by column.
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.
fieldTypeAddForm This function is used when you need to change the field type but only for the add/insert form
fieldTypeCloneForm This function is used when you need to change the field type but only for the clone form
fieldTypeColumn This function is used when you need to change the field type but only for the datagrid column.
fieldTypeEditForm This function is used when 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 3 functions at once: fieldTypeAddForm, fieldTypeEditForm, fieldTypeReadForm
fieldTypeReadForm This function is used when you need to change the field type but only for the read/view form
fields This is simply an alias of using addFields, editFields and readFields.
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.
readOnlyAddFields Specify the fields that will be read-only but only for the add form.
readOnlyCloneFields Specify the fields that will be read-only (user can't edit) for the Clone form.
readOnlyEditFields Specify the fields that will be read-only (user can't edit) for the edit form.
readOnlyFields Specifying the fields that can't be edited and will only be viewed.
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 Changing the default API url path (that uses the reference URL). This is commonly used at multiple instances.
setClone Enabling the clone functionality for the datagrid. Clone is basically copying all the data to an insert form.
setConfig Quickly set a config value. Really useful for some CRUD that have slightly different configurations than the generic ones.
setCsrfTokenName Specify the token name for CSRF protection. This field will be sent in every AJAX request if the value is not empty.
setCsrfTokenValue Specify the token value for CSRF protection. This value will only be sent through AJAX calls if it is not empty.
setDelete Setting the delete functionality. This function is rare to use as the default is already enabled.
setDeleteMultiple Setting the 'delete multiple rows' operation. This function is rare to use as the default is already enabled.
setDependentRelation Depended dropdown lists for setRelation (e.g. City dropdown is depended from Country dropdown)
setEdit Setting the update functionality. This function is rare to use as the default is already enabled.
setExport Setting the export functionality. This function is rare to use as the default is already enabled.
setFieldUpload This method is used in order to transform an already existing field to an upload field for files or images.
setLangString Change any handle of the translation.
setLanguage Simply setting the language.
setLanguagePath Change the default language path for your CRUD.
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 funcion is used to set a validation rule at the backend.
setRules The method setRules is used to combine multiple setRule methods into one.
setSkin Choose one of the two skins, bootstrap v3 and bootstrap v4
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.
setThemePath A method that it is useful when we need to change the default folder path of the theme.
setUniqueId Each CRUD has a unique cache id. The setUniqueId method is a useful tool for a custom string uniqueId.
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.
unsetAutoloadJavaScript Unset the initial load of the GroceryCRUD so we can load it dynamically.
unsetBootstrap Do not load Bootstrap CSS. This is used when the Bootstrap CSS is already loaded at the template.
unsetClone The method unsetRead 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)
unsetDeleteMultiple Unset the ability for the user to delete multiple rows. Notice that the delete for 1 row is still working as expected without any limitation.
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 and view form. This method is simply combining the methods: unsetAddFields, unsetEditFields, 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.
unsetModernizr Do not load Modernizr. This is used when Modernizr is already loaded at the application.
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.
unsetReact This method is used when React is already loaded at your project or you need to experiment with a newer React version.
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.
unsetSearchColumns Unset the search on the datagrid from quick column search and from filtering.
unsetTexteditor The function unsetTexteditor is really rare to use as per default there is not any load of the texteditor for optimising purposes .
where Filter the queries with a extra where statement.
Callback Functionality (Changing or enhancing the default behavior)
callbackAddField A callback that is used in case you need to create a custom field for the add form
callbackAddForm A callback in order to change the default data before the add form modal will display
callbackAfterDelete The callback that will be used right after the delete.
callbackAfterDeleteMultiple The callback that will be used right after the multiple delete functionality.
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.
callbackAfterUpload The callback that will be triggered right after the upload.
callbackBeforeDelete The callback will be triggered before the delete functionality.
callbackBeforeDeleteMultiple The callback will be triggered right before the multiple 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.
callbackBeforeUpload The callback is used in cases we need to filter the uploaded data before the upload 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.
callbackDeleteMultiple Replaces the default multiple delete functionality with the one at the callback.
callbackEditField A callback that is used in case you need to create a custom field for the edit/update form
callbackEditForm callbackEditForm is used when we need to replace, filter or append the data that we are about to display on the edit 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
callbackReadForm A callback to change the read data that will display at the read/view modal.
callbackUpdate The callback is used when we need to replace the default update functionality.
callbackUpload The callback is used when we need to replace the default upload functionality.
Function name Small description