ModuleController
abstract class ModuleController extends Controller (View source)
Traits
Properties
protected Application | $app | ||
protected Request | $request | ||
protected string | $namespace | ||
protected string | $routePrefix | ||
protected string | $moduleName | ||
protected string | $modelName | ||
protected string | $modelTitle | ||
protected ModuleRepository | $repository | ||
protected array | $defaultIndexOptions | Options of the index view. |
|
protected array | $indexWith | Relations to eager load for the index view. |
|
protected array | $formWith | Relations to eager load for the form view. |
|
protected array | $formWithCount | Relation count to eager load for the form view. |
|
protected array | $filters | Additional filters for the index view. |
|
protected array | $filterLinks | Additional links to display in the listing filter. |
|
protected array | $filtersDefaultOptions | Filters that are selected by default in the index view. |
|
protected array | $defaultOrders | Default orders for the index view. |
|
protected int | $perPage | ||
protected string | $titleColumnKey | Name of the index column to use as name column. |
|
protected string | $identifierColumnKey | Name of the index column to use as identifier column. |
|
protected string | $titleFormKey | Attribute to use as title in forms. |
|
protected string | $featureField | Feature field name if the controller is using the feature route (defaults to "featured"). |
|
protected bool | $submodule | Indicates if this module is edited through a parent module. |
|
protected int|null | $submoduleParentId | ||
protected bool | $disableEditor | Can be used in child classes to disable the content editor (full screen block editor). |
|
protected array | $indexOptions | ||
protected array | $indexColumns | ||
protected array | $browserColumns | ||
protected string | $permalinkBase | ||
protected array | $defaultFilters | ||
protected string | $viewPrefix | ||
protected string | $previewView | ||
protected array | $fieldsPermissions | List of permissions keyed by a request field. Can be used to prevent unauthorized field updates. |
|
protected bool | $enableDraftRevisions | Determines if draft revisions can be added on top of published content. |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
__construct(Application $app, Request $request)
No description
void
removeMiddleware(string $middleware)
Attempts to unset the given middleware.
array|null
getSubmitOptions(Model $item)
No description
protected array|null
getSubmitOptionsForDraftRevisions(Model $item)
No description
protected void
setMiddlewarePermission()
No description
protected string|int|null
getParentModuleIdFromRequest(Request $request)
No description
array|View
index(int|null $parentModuleId = null)
No description
JsonResponse
browser()
No description
JsonResponse
store(int|null $parentModuleId = null)
No description
RedirectResponse
show($id, int|null $submoduleId = null)
No description
JsonResponse|RedirectResponse|View
edit(int $id, int|null $submoduleId = null)
No description
JsonResponse|RedirectResponse|View
create(int $parentModuleId = null)
No description
JsonResponse
update(int $id, int|null $submoduleId = null)
No description
protected
performUpdate($item)
No description
View
preview(int $id)
No description
View
restoreRevision(int $id)
No description
JsonResponse
publish()
No description
JsonResponse
bulkPublish()
No description
JsonResponse
duplicate(int $id, int|null $submoduleId = null)
No description
JsonResponse
destroy(int $id, int|null $submoduleId = null)
No description
JsonResponse
bulkDelete()
No description
JsonResponse
forceDelete()
No description
JsonResponse
bulkForceDelete()
No description
JsonResponse
restore()
No description
JsonResponse
bulkRestore()
No description
JsonResponse
feature()
No description
JsonResponse
bulkFeature()
No description
JsonResponse
reorder()
No description
JsonResponse
tags()
No description
array
additionalTableActions()
No description
protected array
getIndexData(array $prependScope = [])
No description
protected array
indexData(Request $request)
No description
protected Collection
getIndexItems(array $scopes = [], bool $forcePagination = false)
No description
protected Collection
transformIndexItems(Collection $items)
No description
protected array
getIndexTableData(Collection $items)
No description
protected array
indexItemData(Model $item)
No description
protected array
getItemColumnData(Model $item, array $column)
No description
protected int|string
getItemIdentifier(Model $item)
No description
protected array
getIndexTableColumns(Collection $items)
No description
protected array
getIndexTableMainFilters(Collection $items, array $scopes = [])
No description
protected array
getIndexUrls(string $moduleName, string $routePrefix)
No description
protected bool
getIndexOption(string $option)
No description
protected array
getBrowserData(array $prependScope = [])
No description
protected array
getBrowserTableData(Collection $items)
No description
protected Collection
getBrowserItems(array $scopes = [])
No description
protected array
filterScope(array $prepend = [])
No description
protected array
getRequestFilters()
No description
protected void
applyFiltersDefaultOptions()
No description
protected array
orderScope()
No description
protected array
form(int $id, Model|null $item = null)
No description
protected array
modalFormData(int $id)
No description
protected array
formData(Request $request)
No description
protected array
previewData(Request $item)
No description
protected Request
validateFormRequest()
No description
getFormRequestClass()
No description
protected string
getNamespace()
No description
protected string
getRoutePrefix()
No description
protected string
getModulePermalinkBase()
No description
protected string
getModelName()
No description
protected ModuleRepository
getRepository()
No description
getRepositoryClass($model)
No description
protected string|null
getViewPrefix()
No description
protected string
getModelTitle()
No description
protected string
getParentModuleForeignKey()
No description
protected string
getPermalinkBaseUrl()
No description
protected array
getLocalizedPermalinkBase()
No description
protected string
getPermalinkPrefix(string $baseUrl)
No description
protected string
getModuleRoute(int $id, string $action)
No description
protected bool
moduleHas(string $behavior)
No description
protected bool
titleIsTranslatable()
No description
protected void
setBackLink(string|null $back_link = null, array $params = [])
No description
protected string
getBackLink(string|null $fallback = null, array $params = [])
No description
protected string
getBackLinkSessionKey()
No description
protected RedirectResponse
redirectToForm(int $id, array $params = [])
No description
protected JsonResponse
respondWithSuccess(string $message)
No description
protected JsonResponse
respondWithRedirect(string $redirectUrl)
No description
protected JsonResponse
respondWithError(string $message)
No description
protected JsonResponse
respondWithJson(string $message, mixed $variant)
No description
protected void
fireEvent(array $input = [])
No description
Collection|Block[]
getRepeaterList()
No description