-
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.
Merge pull request #69 from kitan1982/bugfix
UI update
- Loading branch information
Showing
7 changed files
with
202 additions
and
26 deletions.
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
Oops, something went wrong.