Backend\Widgets\Filter\ScopeProcessor

Overview

ScopeProcessor concern


Protected Methods

protected makeNestedFilterModel()

protected makeNestedFilterModel($model, $field): void

makeNestedFilterModel resolves a relation based on a nested field name E.g: model[relation1][relation2] → $model->relation1()->relation2()

protected processFieldOptionValues()

protected processFieldOptionValues($scopes): void 

processFieldOptionValues sets the callback for retrieving options

protected processFilterWidgetScopes()

protected processFilterWidgetScopes($scopes): void 

processFilterWidgetScopes will mutate scopes types that are registered as widgets, convert their type to 'widget' and internally allocate the widget object

protected processLegacyDefinitions()

protected processLegacyDefinitions($scopes): void 

processLegacyDefinitions applies deprecated definitions for backwards compatibility

protected processPermissionCheck()

protected processPermissionCheck($scopes): void 

processPermissionCheck check if user has permissions to show the scope and removes it if permission is denied

protected processScopeModels()

protected processScopeModels($scopes): void 

processScopeModels creates associated models for scopes