function collaborationGroup()
 {
     if (isset($this->GroupID) and $this->GroupID) {
         return eZCollaborationGroup::fetch($this->GroupID, $this->UserID);
     }
     return null;
 }
Ejemplo n.º 2
0
<?php

/**
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version 2014.11.1
 * @package kernel
 */
$Module = $Params['Module'];
$ViewMode = $Params['ViewMode'];
$GroupID = $Params['GroupID'];
$Offset = $Params['Offset'];
if (!is_numeric($Offset)) {
    $Offset = 0;
}
$collabGroup = eZCollaborationGroup::fetch($GroupID);
if ($collabGroup === null) {
    return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
if (!eZCollaborationViewHandler::groupExists($ViewMode)) {
    return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
$view = eZCollaborationViewHandler::instance($ViewMode, eZCollaborationViewHandler::TYPE_GROUP);
$template = $view->template();
$collabGroupTitle = $collabGroup->attribute('title');
$viewParameters = array('offset' => $Offset);
$tpl = eZTemplate::factory();
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('collab_group', $collabGroup);
$Result = array();
$Result['content'] = $tpl->fetch($template);
 function parentGroup()
 {
     if (isset($this->ParentGroupID) and $this->ParentGroupID) {
         return eZCollaborationGroup::fetch($this->ParentGroupID);
     }
     return null;
 }