Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Merge v3 changes #93

Merged
merged 5 commits into from
Sep 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Bridge/MessageModuleBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Zikula\UsersModule\MessageModule\MessageModuleInterface;

/**
* MessagesModuleBridge
* MessagesModuleBridge.
*
* @author Kaik
*/
Expand Down Expand Up @@ -48,20 +48,19 @@ class MessageModuleBridge implements MessageModuleInterface
/**
* MessagesModuleBridge constructor.
*
* @param RouterInterface $router
* @param RequestStack $requestStack
* @param VariableApiInterface $variableApi
* @param CurrentUserApi $currentUser
* @param RouterInterface $router
* @param RequestStack $requestStack
* @param VariableApiInterface $variableApi
* @param CurrentUserApi $currentUser
* @param UserRepositoryInterface $userRepository
* @param string $prefix
* @param string $prefix
*/
public function __construct(
RouterInterface $router,
RequestStack $requestStack,
VariableApiInterface $variableApi,
CurrentUserApi $currentUser
)
{
) {
$this->router = $router;
$this->requestStack = $requestStack;
$this->variableApi = $variableApi;
Expand Down
36 changes: 4 additions & 32 deletions Container/LinkContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private function getAccount()
];

$links[] = [
'url' => $this->router->generate('zikulaintercommodule_messages_preferences'),
'url' => $this->router->generate('zikulaintercommodule_user_preferences'),
'text' => $this->translator->__('Messages settings'),
'title' => $this->translator->__('Private messaging settings'),
'icon' => 'wrench',
Expand Down Expand Up @@ -181,7 +181,6 @@ private function getUser()
return $links;
}

// //if ($this->variableApi->get('mode') == 0) {
$links[] = [
'url' => $this->router->generate('zikulaintercommodule_messages_getmessages', ['box' => 'inbox']),
'text' => $this->translator->__('Inbox'),
Expand All @@ -191,7 +190,7 @@ private function getUser()
$links[] = [
'url' => $this->router->generate('zikulaintercommodule_messages_getmessages', ['box' => 'sent']),
'text' => $this->translator->__('Sent'),
'title' => $this->translator->__('Messages send by you'),
'title' => $this->translator->__('Messages sent by you'),
'icon' => 'envelope',
];
$links[] = [
Expand All @@ -217,7 +216,7 @@ private function getUser()
$labelsLinks = [];
foreach ($defaultLabels as $dLabel) {
$labelsLinks[] = [
'url' => $this->router->generate('zikulaintercommodule_messages_newmessage'),
'url' => $this->router->generate('zikulaintercommodule_messages_getmessages', ['box' => 'labels', 'label' => $dLabel->getUrlName()]),
'text' => $this->translator->__($dLabel->getName()),
'icon' => 'tag',
];
Expand All @@ -230,7 +229,7 @@ private function getUser()
'links' => $labelsLinks,
];
$links[] = [
'url' => $this->router->generate('zikulaintercommodule_messages_preferences'),
'url' => $this->router->generate('zikulaintercommodule_user_preferences'),
'text' => $this->translator->__('Settings'),
'title' => $this->translator->__('Private messaging settings'),
'icon' => 'wrench',
Expand All @@ -241,33 +240,6 @@ private function getUser()
'title' => $this->translator->__('Click here to compose new message'),
'icon' => 'file',
];
// // }
// if ($this->variableApi->get('mode') == 1) {
// $links[] = array(
// 'url' => $this->router->generate('zikulaintercommodule_conversations_list'),
// 'text' => $this->translator->__('Conversations'),
// 'title' => $this->translator->__('See all of your conversations'),
// 'icon' => 'coffee'
// );
// $links[] = array(
// 'url' => $this->router->generate('zikulaintercommodule_archive_list'),
// 'text' => $this->translator->__('Archive'),
// 'title' => $this->translator->__('Your saved conversations'),
// 'icon' => 'archive'
// );
// $links[] = array(
// 'url' => $this->router->generate('zikulaintercommodule_user_preferences'),
// 'text' => $this->translator->__('Display messages settings'),
// 'title' => $this->translator->__('Private messaging settings'),
// 'icon' => 'wrench'
// );
// $links[] = array(
// 'url' => $this->router->generate('zikulaintercommodule_conversations_list'),
// 'text' => $this->translator->__('Start new conversation'),
// 'title' => $this->translator->__('New conversation'),
// 'icon' => 'file'
// );
// }

return $links;
}
Expand Down
Loading