ListController
class ListController extends ControllerAction
List Controller Class
Traits
Widget Maker Trait Class
Extension trait
Properties
string | $configPath | from ConfigMaker | |
protected | $configFileExtension | from ConfigMaker | |
array | $vars | from ViewMaker | |
array | $viewPath | from ViewMaker | |
array | $layoutPath | from ViewMaker | |
array | $partialPath | from ViewMaker | |
string | $layout | from ViewMaker | |
bool | $suppressLayout | from ViewMaker | |
protected | $viewFileExtension | from ViewMaker | |
static protected array | $extensionCallbacks | from ExtensionTrait | |
static string | $extendableStaticCalledClass | from ExtensionTrait | |
protected | $extensionHidden | from ExtensionTrait | |
protected Controller | $controller | from ControllerAction | |
protected array | $config | from ControllerAction | |
protected | $requiredProperties | ||
protected string | $primaryAlias | ||
array | $listConfig | Define controller list configuration array. |
|
protected Lists[] | $listWidgets | ||
protected Toolbar[] | $toolbarWidgets | ||
protected Filter[] | $filterWidgets | ||
protected array | $requiredConfig |
Methods
Reads the contents of the supplied file and applies it to this object.
Reads the contents of the supplied file and applies it to this object.
Merges two configuration sources, either prepared or not, and returns them as a single configuration object.
Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.
Guess the package path for the called class.
Guess the package path from a specified class.
Guess the package path from a specified class.
Render a layout.
Render a partial file contents located in the views or partial folder.
Includes a file path using output buffering.
Makes a widget object with the supplied configuration ex. model config
Makes a form widget object with the supplied form field and widget configuration.
Helper method for ::extend()
static method
List_Controller constructor.
Sets the widget configuration values
Get the widget configuration values.
Protects a public method from being available as an controller method.
Controller override: Extend the query used for populating the list before the default query is processed.
Controller override: Extend the query used for populating the list after the default query is processed.
listExtendRecords controller override: Extend the records used for populating the list after the query is processed.
Controller override: Extend the query used for populating the filter options before the default query is processed.
Replace a table column value (
Replace the entire table header contents (
Static helper for extending list columns.
No description
No description
Creates all the widgets based on the model config.
Prepare the widgets used by this action
No description
No description
Returns the widget used by this behavior.
Returns the configuration used by this behavior.
Details
in
ConfigMaker at line 27
array
loadConfig(array $configFile = [], array $requiredConfig = [], null $index = null)
Reads the contents of the supplied file and applies it to this object.
in
ConfigMaker at line 46
array
makeConfig(string|array $configFile, array $requiredConfig = [])
Reads the contents of the supplied file and applies it to this object.
in
ConfigMaker at line 97
array
mergeConfig($configLeft, $configRight)
Merges two configuration sources, either prepared or not, and returns them as a single configuration object.
in
ConfigMaker at line 116
string
getConfigPath(string $fileName, mixed $configPath = null)
Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.
in
ConfigMaker at line 154
string
guessConfigPath(string $suffix = '')
Guess the package path for the called class.
in
ConfigMaker at line 169
string
guessConfigPathFrom(string $class, string $suffix = '')
Guess the package path from a specified class.
in
ViewMaker at line 50
getViewPath($view, $viewPath = null)
No description
in
ViewMaker at line 78
guessViewFileExtension($path)
No description
in
ViewMaker at line 98
string
guessViewPath(string $suffix = '', bool $isPublic = false)
Guess the package path from a specified class.
in
ViewMaker at line 119
mixed
makeLayout(string $name = null, array $vars = [], bool $throwException = true)
Render a layout.
in
ViewMaker at line 147
string
makeView(string $view)
Loads a view with the name specified.
Applies layout if its name is provided by the parent object. The view file must be situated in the views directory, and has the extension "htm" or "php".
in
ViewMaker at line 171
mixed
makePartial(string $partial, array $vars = [], bool $throwException = true)
Render a partial file contents located in the views or partial folder.
in
ViewMaker at line 199
string
makeFileContent(string $filePath, array $extraParams = [])
Includes a file path using output buffering.
Ensures that vars are available.
in
ViewMaker at line 235
compileFileContent($filePath)
No description
in
ViewMaker at line 256
protected void
handleViewException(Exception $e, int $obLevel)
Handle a view exception.
in
ViewMaker at line 271
protected array
gatherViewData($data)
Get the data bound to the view instance.
in
WidgetMaker at line 24
BaseWidget
makeWidget(string $class, array $widgetConfig = [])
Makes a widget object with the supplied configuration ex. model config
in
WidgetMaker at line 47
BaseFormWidget
makeFormWidget(string $class, mixed $fieldConfig = [], array $widgetConfig = [])
Makes a form widget object with the supplied form field and widget configuration.
in
ExtensionTrait at line 32
extensionApplyInitCallbacks()
No description
in
ExtensionTrait at line 51
static void
extensionExtendCallback(callable $callback)
Helper method for ::extend()
static method
in
ExtensionTrait at line 64
protected
extensionHideField($name)
No description
in
ExtensionTrait at line 69
protected
extensionHideMethod($name)
No description
in
ExtensionTrait at line 74
extensionIsHiddenField($name)
No description
in
ExtensionTrait at line 79
extensionIsHiddenMethod($name)
No description
in
ExtensionTrait at line 84
static
getCalledExtensionClass()
No description
at line 69
__construct(Controller $controller)
List_Controller constructor.
in
ControllerAction at line 65
setConfig(string|array $config, array $required = [])
Sets the widget configuration values
in
ControllerAction at line 78
mixed
getConfig(string $name = null, mixed $default = null)
Get the widget configuration values.
in
ControllerAction at line 103
protected
hideAction($methodName)
Protects a public method from being available as an controller method.
in
ListExtendable at line 17
void
listExtendColumns(Lists $host)
Called after the list columns are defined.
in
ListExtendable at line 29
listExtendModel(Model $model, null $alias = null)
Controller override: Extend supplied model
in
ListExtendable at line 40
listExtendQueryBefore(Builder $query, $alias = null)
Controller override: Extend the query used for populating the list before the default query is processed.
in
ListExtendable at line 50
listExtendQuery(Builder $query, $alias = null)
Controller override: Extend the query used for populating the list after the default query is processed.
in
ListExtendable at line 59
listExtendRecords(LengthAwarePaginator|Collection $records, $alias = null)
listExtendRecords controller override: Extend the records used for populating the list after the query is processed.
in
ListExtendable at line 70
listFilterExtendQuery(Builder $query, array $scope)
Controller override: Extend the query used for populating the filter options before the default query is processed.
in
ListExtendable at line 81
void
listFilterExtendScopesBefore(Filter $host)
Called before the filter scopes are defined.
in
ListExtendable at line 93
void
listFilterExtendScopes(Filter $host, $scopes)
Called after the filter scopes are defined.
in
ListExtendable at line 106
string
listOverrideColumnValue(Model $record, string $column, string $alias = null)
Replace a table column value (
in
ListExtendable at line 118
string
listOverrideHeaderValue(string $columnName, string $alias = null)
Replace the entire table header contents (
in
ListExtendable at line 129
static void
extendListColumns(callable $callback)
Static helper for extending list columns.
at line 94
index()
No description
at line 103
index_onDelete()
No description
at line 148
array
makeLists()
Creates all the widgets based on the model config.
at line 166
BaseWidget
makeList($alias)
Prepare the widgets used by this action
at line 272
renderList($alias = null)
No description
at line 292
refreshList($alias = null)
No description
at line 312
BaseWidget
getListWidget(string $alias = null)
Returns the widget used by this behavior.
at line 328
BaseWidget
getListConfig(null $alias = null)
Returns the configuration used by this behavior.