PluginProbe
Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager / 0.0.9
Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager v0.0.9
0.0.11 0.0.10 0.0.9 0.0.8 0.0.7 0.0.6 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5
cookiez / modules / script / module.php

module.php in Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager 0.0.9, at modules/script/module.php

62 lines 977 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Cookiez\Modules\Script;
4
5 use Cookiez\Classes\Module_Base;
6 use Cookiez\Modules\Script\Database\Script_Table;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 /**
13 * Module `Script`
14 * Manages script entity storage and relationships
15 */
16 class Module extends Module_Base {
17
18 /**
19 * Get module name
20 * @return string
21 */
22 public function get_name(): string {
23 return 'Script';
24 }
25
26 /**
27 * Get list of REST routes
28 * @return array
29 */
30 public static function routes_list(): array {
31 return [
32 'Create_Script',
33 'Get_Scripts',
34 'Update_Script',
35 'Delete_Script',
36 ];
37 }
38
39 public static function component_list(): array {
40 return [
41 'Script',
42 ];
43 }
44
45 /**
46 * Install database tables
47 * Called on plugin activation
48 */
49 public static function install_tables(): void {
50 Script_Table::install();
51 }
52
53 /**
54 * Constructor
55 */
56 public function __construct() {
57 $this->install_tables();
58 $this->register_components();
59 $this->register_routes();
60 }
61 }
62