mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-31 20:52:17 +01:00
Use OC::$server->getNavigationManager()
This commit is contained in:
parent
8e0b6e45fd
commit
5e38bf07cb
@ -21,14 +21,15 @@ use \OC\AppFramework\Core\API;
|
|||||||
|
|
||||||
$api = new API('contacts');
|
$api = new API('contacts');
|
||||||
|
|
||||||
$api->addNavigationEntry(array(
|
\OC::$server->getNavigationManager()->add(array(
|
||||||
'id' => 'contacts_index',
|
'id' => 'contacts',
|
||||||
'order' => 10,
|
'order' => 10,
|
||||||
'href' => \OCP\Util::linkToRoute('contacts_index'),
|
'href' => \OCP\Util::linkToRoute('contacts_index'),
|
||||||
'icon' => \OCP\Util::imagePath( 'contacts', 'contacts.svg' ),
|
'icon' => \OCP\Util::imagePath( 'contacts', 'contacts.svg' ),
|
||||||
'name' => \OCP\Util::getL10N('contacts')->t('Contacts')
|
'name' => \OCP\Util::getL10N('contacts')->t('Contacts')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
\OC::$server->getNavigationManager()->setActiveEntry('contacts');
|
||||||
|
|
||||||
$api->connectHook('OC_User', 'post_createUser', '\OCA\Contacts\Hooks', 'userCreated');
|
$api->connectHook('OC_User', 'post_createUser', '\OCA\Contacts\Hooks', 'userCreated');
|
||||||
$api->connectHook('OC_User', 'post_deleteUser', '\OCA\Contacts\Hooks', 'userDeleted');
|
$api->connectHook('OC_User', 'post_deleteUser', '\OCA\Contacts\Hooks', 'userDeleted');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user