Vendor extends Component
Handles vendors.
Table of Contents
- __construct() : mixed
- Class constructor.
- add_vendor_fields() : array<string|int, mixed>
- Adds vendor fields.
- alter_listing_view_page() : array<string|int, mixed>
- Alters listing view page.
- alter_post_types() : array<string|int, mixed>
- Alters post types.
- alter_user_edit_settings_page() : array<string|int, mixed>
- Alters user edit settings page.
- create_listing() : mixed
- Creates listing.
- set_request_context() : array<string|int, mixed>
- Sets request context.
- update_user() : mixed
- Updates user.
- update_vendor() : mixed
- Updates vendor.
- update_vendor_fields() : array<string|int, mixed>
- Updates vendor fields.
- update_vendor_status() : mixed
- Updates vendor status.
- boot() : mixed
- Bootstraps component properties.
- set_callbacks() : mixed
- Sets the action and filter callbacks.
- set_property() : mixed
- Sets a property value.
- update_listings() : mixed
- Updates listings.
Methods
__construct()
Class constructor.
public
__construct([array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $args : array<string|int, mixed> = []
-
Component arguments.
Return values
mixed —add_vendor_fields()
Adds vendor fields.
public
add_vendor_fields(array<string|int, mixed> $form_args, object $form) : array<string|int, mixed>
Parameters
- $form_args : array<string|int, mixed>
-
Form arguments.
- $form : object
-
Form object.
Return values
array<string|int, mixed> —alter_listing_view_page()
Alters listing view page.
public
alter_listing_view_page(array<string|int, mixed> $template) : array<string|int, mixed>
Parameters
- $template : array<string|int, mixed>
-
Template arguments.
Return values
array<string|int, mixed> —alter_post_types()
Alters post types.
public
alter_post_types(array<string|int, mixed> $post_types) : array<string|int, mixed>
Parameters
- $post_types : array<string|int, mixed>
-
Post type arguments.
Return values
array<string|int, mixed> —alter_user_edit_settings_page()
Alters user edit settings page.
public
alter_user_edit_settings_page(array<string|int, mixed> $blocks, object $template) : array<string|int, mixed>
Parameters
- $blocks : array<string|int, mixed>
-
Template arguments.
- $template : object
-
Template object.
Return values
array<string|int, mixed> —create_listing()
Creates listing.
public
create_listing(int $listing_id, object $listing) : mixed
Parameters
- $listing_id : int
-
Listing ID.
- $listing : object
-
Listing object.
Return values
mixed —set_request_context()
Sets request context.
public
set_request_context(array<string|int, mixed> $context) : array<string|int, mixed>
Parameters
- $context : array<string|int, mixed>
-
Request context.
Return values
array<string|int, mixed> —update_user()
Updates user.
public
update_user(int $user_id, object $user) : mixed
Parameters
- $user_id : int
-
User ID.
- $user : object
-
User object.
Return values
mixed —update_vendor()
Updates vendor.
public
update_vendor(int $vendor_id, object $vendor) : mixed
Parameters
- $vendor_id : int
-
Vendor ID.
- $vendor : object
-
Vendor object.
Return values
mixed —update_vendor_fields()
Updates vendor fields.
public
update_vendor_fields(array<string|int, mixed> $errors, object $form) : array<string|int, mixed>
Parameters
- $errors : array<string|int, mixed>
-
Form errors.
- $form : object
-
Form object.
Return values
array<string|int, mixed> —update_vendor_status()
Updates vendor status.
public
update_vendor_status(int $vendor_id, string $new_status, string $old_status, object $vendor) : mixed
Parameters
- $vendor_id : int
-
Vendor ID.
- $new_status : string
-
New status.
- $old_status : string
-
Old status.
- $vendor : object
-
Vendor object.
Return values
mixed —boot()
Bootstraps component properties.
protected
boot() : mixed
Return values
mixed —set_callbacks()
Sets the action and filter callbacks.
protected
final set_callbacks(array<string|int, mixed> $callbacks) : mixed
Parameters
- $callbacks : array<string|int, mixed>
-
Callback arguments.
Return values
mixed —set_property()
Sets a property value.
protected
final set_property(string $name, mixed $value[, string $prefix = '' ]) : mixed
Parameters
- $name : string
-
Property name.
- $value : mixed
-
Property value.
- $prefix : string = ''
-
Method prefix.
Return values
mixed —update_listings()
Updates listings.
protected
update_listings(object $vendor, array<string|int, mixed> $listings) : mixed
Parameters
- $vendor : object
-
Vendor object.
- $listings : array<string|int, mixed>
-
Listing objects.