Pax.Admin.Site behaviour (Pax v0.0.1-dev)
View SourceThis module is used to define the admin site for your application.
use Pax.Admin.Site
When you use Pax.Admin.Site
this module will be imported to provide many convenience macros for defining the
layout of your Admin Site. It will declare @behaviour Pax.Admin.Site
and @before_compile Pax.Admin.Site
. It
will also define many attributes required by Pax.Admin for interoperability with your site. Finally it will define
several functions that can be used to generate paths and URLs to parts of your Admin Site.
Summary
Functions
This macro is used to define the admin site for your application. The :router
option is required and should be
the module name of your main site Router. This is required so that your Admin Site module can generate proper
paths and urls for your Site Admin, which is used in the interface.
Get the path to the show page for a resource object.
Get the path to the show page for a resource object.
Callbacks
@callback config( params :: Phoenix.LiveView.unsigned_params() | :not_mounted_at_router, session :: map(), socket :: Phoenix.LiveView.Socket.t() ) :: nil | map()
@callback resources( params :: Phoenix.LiveView.unsigned_params() | :not_mounted_at_router, session :: map(), socket :: Phoenix.LiveView.Socket.t() ) :: nil | list()
Functions
This macro is used to define the admin site for your application. The :router
option is required and should be
the module name of your main site Router. This is required so that your Admin Site module can generate proper
paths and urls for your Site Admin, which is used in the interface.
Example
use Pax.Admin.Site, router: MyAppWeb.Router
Get the path to the show page for a resource object.
Get the path to the show page for a resource object.