@@ -48,52 +48,52 @@ public function __construct()
4848 public static function getHooks ()
4949 {
5050 return [
51- 'api.register ' => [__CLASS__ , 'apiRegister ' ],
52- 'function.requirements ' => [__CLASS__ , 'getRequirements ' ],
51+ 'api.register ' => [__CLASS__ , 'apiRegister ' ],
52+ 'function.requirements ' => [__CLASS__ , 'getRequirements ' ],
5353 self ::$ module .'.load_processing ' => [__CLASS__ , 'loadProcessing ' ],
54- self ::$ module .'.settings ' => [__CLASS__ , 'getSettings ' ]
54+ self ::$ module .'.settings ' => [__CLASS__ , 'getSettings ' ]
5555 ];
5656 }
5757
58- /**
59- * @param \Symfony\Component\EventDispatcher\GenericEvent $event
60- */
61- public static function getRequirements (GenericEvent $ event )
62- {
63- $ loader = $ event ->getSubject ();
64- $ loader ->add_requirement ('api_get_license_types ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
65- $ loader ->add_requirement ('api_cancel_license_ip ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
66- $ loader ->add_requirement ('api_cancel_license ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
67- $ loader ->add_requirement ('api_buy_license_prepay ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
68- $ loader ->add_requirement ('api_buy_license ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
69- $ loader ->add_requirement ('api_change_license_ip ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
70- $ loader ->add_requirement ('api_change_license_ip_by_id ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
71- }
72-
73- /**
74- * @param \Symfony\Component\EventDispatcher\GenericEvent $event
75- */
76- public static function apiRegister (GenericEvent $ event )
77- {
78- /**
79- * @var \ServiceHandler $subject
80- */
81- //$subject = $event->getSubject();
82- //api_register_array('license_types', 'complexType', 'array', '', 'SOAP-ENC:Array', [], [['ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'license_type[]']], 'license_type');
83- api_register_array ('license_type ' , ['services_id ' => 'int ' , 'services_name ' => 'string ' , 'services_cost ' => 'float ' ]);
84- api_register_array ('buy_license_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' , 'invoice ' => 'int ' , 'cost ' => 'float ' ]);
85- api_register_array ('change_license_ip_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' ]);
86- api_register_array ('change_license_ip_by_id_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' ]);
87- api_register_array ('cancel_license_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' ]);
88- api_register_array ('cancel_license_ip_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' ]);
89- api_register ('api_get_license_types ' , [], ['return ' => 'license_types ' ], 'Get a license of the various license types. ' , false , false );
90- api_register ('api_cancel_license_ip ' , ['sid ' => 'string ' , 'ip ' => 'string ' , 'type ' => 'int ' ], ['return ' => 'cancel_license_ip_return ' ], 'Cancel a License by IP and Type. ' , true , false );
91- api_register ('api_cancel_license ' , ['sid ' => 'string ' , 'id ' => 'int ' ], ['return ' => 'cancel_license_return ' ], 'Cancel a License. ' , true , false );
92- api_register ('api_buy_license ' , ['sid ' => 'string ' , 'ip ' => 'string ' , 'type ' => 'int ' , 'coupon ' => 'string ' ], ['return ' => 'buy_license_return ' ], 'Purchase a License. Returns an invoice ID. ' , true , false );
93- api_register ('api_buy_license_prepay ' , ['sid ' => 'string ' , 'ip ' => 'string ' , 'type ' => 'int ' , 'coupon ' => 'string ' , 'use_prepay ' => 'boolean ' ], ['return ' => 'buy_license_return ' ], 'Purchase a License and optionally uses PrePay. Will return an error if use_prepay is true not enough PrePay funds are available. ' , true , false );
94- api_register ('api_change_license_ip ' , ['sid ' => 'string ' , 'oldip ' => 'string ' , 'newip ' => 'string ' ], ['return ' => 'change_license_ip_return ' ], 'Change the IP on an active license. ' , true , false );
95- api_register ('api_change_license_ip_by_id ' , ['sid ' => 'string ' , 'id ' => 'int ' , 'newip ' => 'string ' ], ['return ' => 'change_license_ip_by_id_return ' ], 'Change the IP on an active license. ' , true , false );
96- }
58+ /**
59+ * @param \Symfony\Component\EventDispatcher\GenericEvent $event
60+ */
61+ public static function getRequirements (GenericEvent $ event )
62+ {
63+ $ loader = $ event ->getSubject ();
64+ $ loader ->add_requirement ('api_get_license_types ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
65+ $ loader ->add_requirement ('api_cancel_license_ip ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
66+ $ loader ->add_requirement ('api_cancel_license ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
67+ $ loader ->add_requirement ('api_buy_license_prepay ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
68+ $ loader ->add_requirement ('api_buy_license ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
69+ $ loader ->add_requirement ('api_change_license_ip ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
70+ $ loader ->add_requirement ('api_change_license_ip_by_id ' , '/../vendor/detain/myadmin-licenses-module/src/api.php ' );
71+ }
72+
73+ /**
74+ * @param \Symfony\Component\EventDispatcher\GenericEvent $event
75+ */
76+ public static function apiRegister (GenericEvent $ event )
77+ {
78+ /**
79+ * @var \ServiceHandler $subject
80+ */
81+ //$subject = $event->getSubject();
82+ //api_register_array('license_types', 'complexType', 'array', '', 'SOAP-ENC:Array', [], [['ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'license_type[]']], 'license_type');
83+ api_register_array ('license_type ' , ['services_id ' => 'int ' , 'services_name ' => 'string ' , 'services_cost ' => 'float ' ]);
84+ api_register_array ('buy_license_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' , 'invoice ' => 'int ' , 'cost ' => 'float ' ]);
85+ api_register_array ('change_license_ip_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' ]);
86+ api_register_array ('change_license_ip_by_id_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' ]);
87+ api_register_array ('cancel_license_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' ]);
88+ api_register_array ('cancel_license_ip_return ' , ['status ' => 'string ' , 'status_text ' => 'string ' ]);
89+ api_register ('api_get_license_types ' , [], ['return ' => 'license_types ' ], 'Get a license of the various license types. ' , false , false );
90+ api_register ('api_cancel_license_ip ' , ['sid ' => 'string ' , 'ip ' => 'string ' , 'type ' => 'int ' ], ['return ' => 'cancel_license_ip_return ' ], 'Cancel a License by IP and Type. ' , true , false );
91+ api_register ('api_cancel_license ' , ['sid ' => 'string ' , 'id ' => 'int ' ], ['return ' => 'cancel_license_return ' ], 'Cancel a License. ' , true , false );
92+ api_register ('api_buy_license ' , ['sid ' => 'string ' , 'ip ' => 'string ' , 'type ' => 'int ' , 'coupon ' => 'string ' ], ['return ' => 'buy_license_return ' ], 'Purchase a License. Returns an invoice ID. ' , true , false );
93+ api_register ('api_buy_license_prepay ' , ['sid ' => 'string ' , 'ip ' => 'string ' , 'type ' => 'int ' , 'coupon ' => 'string ' , 'use_prepay ' => 'boolean ' ], ['return ' => 'buy_license_return ' ], 'Purchase a License and optionally uses PrePay. Will return an error if use_prepay is true not enough PrePay funds are available. ' , true , false );
94+ api_register ('api_change_license_ip ' , ['sid ' => 'string ' , 'oldip ' => 'string ' , 'newip ' => 'string ' ], ['return ' => 'change_license_ip_return ' ], 'Change the IP on an active license. ' , true , false );
95+ api_register ('api_change_license_ip_by_id ' , ['sid ' => 'string ' , 'id ' => 'int ' , 'newip ' => 'string ' ], ['return ' => 'change_license_ip_by_id_return ' ], 'Change the IP on an active license. ' , true , false );
96+ }
9797
9898 /**
9999 * @param \Symfony\Component\EventDispatcher\GenericEvent $event
@@ -147,12 +147,12 @@ public static function loadProcessing(GenericEvent $event)
147147 /**
148148 * @param \Symfony\Component\EventDispatcher\GenericEvent $event
149149 */
150- public static function getSettings (GenericEvent $ event )
151- {
152- /**
153- * @var \MyAdmin\Settings $settings
154- **/
155- $ settings = $ event ->getSubject ();
150+ public static function getSettings (GenericEvent $ event )
151+ {
152+ /**
153+ * @var \MyAdmin\Settings $settings
154+ **/
155+ $ settings = $ event ->getSubject ();
156156 $ settings ->add_dropdown_setting (self ::$ module , _ ('General ' ), 'outofstock_licenses ' , _ ('Out Of Stock Licenses ' ), _ ('Enable/Disable Sales Of This Type ' ), $ settings ->get_setting ('OUTOFSTOCK_LICENSES ' ), ['0 ' , '1 ' ], ['No ' , 'Yes ' ]);
157157 }
158158}
0 commit comments