Admin_Controller implements Registerable, Service, Conditional Uses Service_Container
Sets up the admin services (e.g. the plugin settings page).
Tags
Interfaces, Classes and Traits
- Registerable
- An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().
- Service
- Marker interface to denote a service.
- Conditional
- An object which is loaded conditionally.
Table of Contents
- $plugin : mixed
- $services : mixed
- __construct() : mixed
- Constructor
- get_service() : mixed
- get_services() : mixed
- is_required() : bool
- Is this object required?
- register() : void
- Register hooks and filters
- register_admin_scripts() : mixed
- register_services() : mixed
- _get_services() : mixed
- get_category_config() : array<string|int, mixed>
- Returns the array for the javascript object used by the react app on the category panel.
- get_lead_time_config_for_category() : array<string|int, mixed>
- Return a formatted array with the data belonging to a product category.
- get_lead_time_config_singular_category() : array<string|int, mixed>
- Return a formatted array with the singular data belonging to a product category.
- get_lead_time_per_status_data() : array<string|int, mixed>
- Generate an array of data regarding the stock's details that is used by the react settings.
- get_lead_times_per_stock_config_by_product() : array<string|int, mixed>
- Get the json data of lead times per stock for the product edit page.
- get_product_config() : array<string|int, mixed>
- Get the json data used on the product edit page.
- get_status_config() : array<string|int, mixed>
- Get the javascript object array that is used on the settings panel.
Properties
$plugin
private
mixed
$plugin
$services
private
mixed
$services
= []
Methods
__construct()
Constructor
public
__construct(Licensed_Plugin $plugin) : mixed
Parameters
- $plugin : Licensed_Plugin
Return values
mixed —get_service()
public
get_service(mixed $id) : mixed
Parameters
- $id : mixed
Return values
mixed —get_services()
public
get_services() : mixed
Return values
mixed —is_required()
Is this object required?
public
is_required() : bool
Return values
bool —true if required, false otherwise.
register()
Register hooks and filters
public
register() : void
Return values
void —register_admin_scripts()
public
register_admin_scripts(mixed $hook) : mixed
Parameters
- $hook : mixed
Return values
mixed —register_services()
public
register_services() : mixed
Return values
mixed —_get_services()
private
_get_services() : mixed
Return values
mixed —get_category_config()
Returns the array for the javascript object used by the react app on the category panel.
private
get_category_config() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_lead_time_config_for_category()
Return a formatted array with the data belonging to a product category.
private
get_lead_time_config_for_category([object|bool $term = false ]) : array<string|int, mixed>
If no term is provided return an empty but formatted array.
Parameters
- $term : object|bool = false
Return values
array<string|int, mixed> —get_lead_time_config_singular_category()
Return a formatted array with the singular data belonging to a product category.
private
get_lead_time_config_singular_category([object|bool $term = false ]) : array<string|int, mixed>
Parameters
- $term : object|bool = false
Return values
array<string|int, mixed> —get_lead_time_per_status_data()
Generate an array of data regarding the stock's details that is used by the react settings.
private
get_lead_time_per_status_data() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_lead_times_per_stock_config_by_product()
Get the json data of lead times per stock for the product edit page.
private
get_lead_times_per_stock_config_by_product() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_product_config()
Get the json data used on the product edit page.
private
get_product_config() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_status_config()
Get the javascript object array that is used on the settings panel.
private
get_status_config() : array<string|int, mixed>