mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-21 20:34:57 +09:00
refactor $app->getApiAdmin to $this->di['is_admin_logged'] or $this->di['api_admin']
getApiAdmin() is deprecated
This commit is contained in:
1 parent
5e119399b4
commit
f5fcfd66df
29 files changed
+99
-114
No files matched your search
@@ -86,14 +86,14 @@ class Admin implements \Box\InjectionAwareInterface
|
||||
public function get_index(\Box_App $app)
|
||||
{
|
||||
// always call this method to validate if admin is logged in
|
||||
$api = $app->getApiAdmin();
|
||||
$this->di['is_admin_logged'];
|
||||
return $app->render('mod_example_index');
|
||||
}
|
||||
|
||||
public function get_test(\Box_App $app)
|
||||
{
|
||||
// always call this method to validate if admin is logged in
|
||||
$api = $app->getApiAdmin();
|
||||
$this->di['is_admin_logged'];
|
||||
|
||||
$params = array();
|
||||
$params['youparamname'] = 'yourparamvalue';
|
||||
@@ -104,7 +104,7 @@ class Admin implements \Box\InjectionAwareInterface
|
||||
public function get_user(\Box_App $app, $id)
|
||||
{
|
||||
// always call this method to validate if admin is logged in
|
||||
$api = $app->getApiAdmin();
|
||||
$this->di['is_admin_logged'];
|
||||
|
||||
$params = array();
|
||||
$params['userid'] = $id;
|
||||
@@ -114,7 +114,7 @@ class Admin implements \Box\InjectionAwareInterface
|
||||
public function get_api(\Box_App $app, $id)
|
||||
{
|
||||
// always call this method to validate if admin is logged in
|
||||
$api = $app->getApiAdmin();
|
||||
$this->di['is_admin_logged'];
|
||||
$list_from_controller = $api->example_get_something();
|
||||
|
||||
$params = array();
|
||||
|
||||
Reference in new issue
Block a user