mirror of
https://github.com/humhub/humhub.git
synced 2025-02-19 23:54:54 +01:00
Added AboutPageSidebar widget
This commit is contained in:
parent
5c0c9438cc
commit
dfa2bab027
22
protected/humhub/modules/space/widgets/AboutPageSidebar.php
Normal file
22
protected/humhub/modules/space/widgets/AboutPageSidebar.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace humhub\modules\space\widgets;
|
||||
|
||||
class AboutPageSidebar extends Sidebar
|
||||
{
|
||||
/**
|
||||
* @var \humhub\modules\space\models\Space the space this sidebar is in
|
||||
*/
|
||||
public $space;
|
||||
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->widgets = [];
|
||||
|
||||
if ($this->space->isMember())
|
||||
$this->widgets[] = [MyMembership::class, ['space' => $this->space], ['sortOrder' => 10]];
|
||||
|
||||
$this->widgets[] = [Members::class, ['space' => $this->space], ['sortOrder' => 20]];
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user