$component
$component : \Dewdrop\Admin\Component\CrudInterface|\Dewdrop\Admin\Component\ComponentAbstract
The CRUD component.
Generate a CSV export for a CRUD component's Listing.
The stock page controller implements a basic three step execution process:
Sub-classes, such as EditAbstract, can be created that alter this basic page controller flow of execution. EditAbstract, for example, will only call process() if the request is a POST.
$component : \Dewdrop\Admin\Component\CrudInterface|\Dewdrop\Admin\Component\ComponentAbstract
The CRUD component.
$view : \Dewdrop\View\View
A view object available for rendering. Generally, your page should not be rendering any output directly, but instead passing information from models to the view and then rendering the view.
$request : \Dewdrop\Request
An object representing the current HTTP request. The is primarily around to make it easier to test your pages by injecting POST and GET data into the request object.
$visibilityFilter : \Dewdrop\Fields\Filter\Visibility
__construct(\Dewdrop\Admin\Component\ComponentInterface $component, \Dewdrop\Request $request, string $viewScriptPath = null)
Create a new page with a reference to its component and the file in which it is defined.
Also, by default, the page will be configured to look for view scripts in the view-scripts sub-folder of its component.
\Dewdrop\Admin\Component\ComponentInterface | $component | |
\Dewdrop\Request | $request | |
string | $viewScriptPath |
process(\Dewdrop\Admin\ResponseHelper\Standard $response)
Perform any processing or data manipulation needed before render.
A response helper object will be passed to this method to allow you to easily add success messages or redirects. This helper should be used to handle these kinds of actions so that you can easily test your page's code.
\Dewdrop\Admin\ResponseHelper\Standard | $response |
url(string $page, array $params = array()) : string
As the component this page belongs to for a URL matching the provided page and query string parameters. This method should always be used for generating URLs in your components so that it will play nicely with various WP integration points like submenus.
string | $page | |
array | $params |
createResponseHelper(callable $redirector) : \Dewdrop\Admin\ResponseHelper\Standard
Create a response helper object for this page.
If your page would benefit from an alternative response helper with additional methods relevant to your use case, you can override this method and the helper will be injected into the page's process() method rather than the standard helper created in PageAbstract.
callable | $redirector |
getView() : \Dewdrop\View\View
Get a reference to this page's view object.
setVisibilityFilter(\Dewdrop\Fields\Filter\Visibility $visibilityFilter) : $this
\Dewdrop\Fields\Filter\Visibility | $visibilityFilter |
getVisibilityFilter() : \Dewdrop\Fields\Filter\Visibility