-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set last message row in bold in subjects list if there are new messages
- Loading branch information
kitan1982
committed
Jun 22, 2015
1 parent
591b8f5
commit ff4e002
Showing
5 changed files
with
140 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Claroline Connect package. | ||
* | ||
* (c) Claroline Consortium <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Claroline\ForumBundle\Event\Log; | ||
|
||
use Claroline\CoreBundle\Event\Log\AbstractLogResourceEvent; | ||
use Claroline\ForumBundle\Entity\Subject; | ||
|
||
class ReadSubjectEvent extends AbstractLogResourceEvent | ||
{ | ||
const ACTION = 'resource-claroline_forum-read_subject'; | ||
|
||
/** | ||
* @param Subject $subject | ||
*/ | ||
public function __construct(Subject $subject) | ||
{ | ||
$details = array( | ||
'subject' => array( | ||
'id' => $subject->getId(), | ||
'title' => $subject->getTitle() | ||
), | ||
'category' => array( | ||
'id' => $subject->getCategory()->getId() | ||
), | ||
'forum' => array( | ||
'id' => $subject->getCategory()->getForum()->getId() | ||
) | ||
); | ||
|
||
parent::__construct($subject->getCategory()->getForum()->getResourceNode(), $details); | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public static function getRestriction() | ||
{ | ||
return array(self::DISPLAYED_WORKSPACE, self::DISPLAYED_ADMIN); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters