PluginProbe
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 1.0.3
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v1.0.3
4.7.2 4.7.1 4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 All 281 releases
surecart / app / src / Controllers / Admin / Subscriptions / SubscriptionsController.php
SubscriptionsController.php
58 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace SureCart\Controllers\Admin\Subscriptions;
4
5 use SureCart\Controllers\Admin\AdminController;
6 use SureCart\Controllers\Admin\Subscriptions\SubscriptionsListTable;
7 use SureCart\Controllers\Admin\Subscriptions\Scripts\EditScriptsController;
8 use SureCart\Controllers\Admin\Subscriptions\Scripts\ShowScriptsController;
9
10 /**
11 * Handles product admin requests.
12 */
13 class SubscriptionsController extends AdminController {
14 /**
15 * Orders index.
16 */
17 public function index() {
18 $table = new SubscriptionsListTable();
19 $table->prepare_items();
20 $this->withHeader(
21 [
22 'subscriptions' => [
23 'title' => __( 'Subscriptions', 'surecart' ),
24 ],
25 ]
26 );
27 return \SureCart::view( 'admin/subscriptions/index' )->with(
28 [
29 'table' => $table,
30 ]
31 );
32 }
33
34 /**
35 * Edit
36 *
37 * @return string
38 */
39 public function edit() {
40 // enqueue needed script.
41 add_action( 'admin_enqueue_scripts', \SureCart::closure()->method( EditScriptsController::class, 'enqueue' ) );
42 // return view.
43 return '<div id="app"></div>';
44 }
45
46 /**
47 * Show
48 *
49 * @return string
50 */
51 public function show() {
52 // enqueue needed script.
53 add_action( 'admin_enqueue_scripts', \SureCart::closure()->method( ShowScriptsController::class, 'enqueue' ) );
54 // return view.
55 return '<div id="app"></div>';
56 }
57 }
58