Version 5.0.0 beta 10
This commit is contained in:
1 parent
56979f8ee8
commit
264eeb97e0
325 files changed
+6442
-1849
No files matched your search
@@ -36,6 +36,7 @@ use IPS\gallery\Album;
|
||||
use IPS\gallery\Application;
|
||||
use IPS\gallery\Category;
|
||||
use IPS\gallery\Image;
|
||||
use IPS\Helpers\Badge;
|
||||
use IPS\Helpers\Menu;
|
||||
use IPS\Member;
|
||||
use IPS\Node\Model;
|
||||
@@ -752,4 +753,25 @@ Filter
|
||||
}
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return badges that should be displayed with the content header
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function badges() : array
|
||||
{
|
||||
$badges = parent::badges();
|
||||
|
||||
if( $this->type == Album::AUTH_TYPE_PRIVATE )
|
||||
{
|
||||
$badges[] = new Badge( Badge::BADGE_WARNING, 'album_private_badge' );
|
||||
}
|
||||
elseif( $this->type == Album::AUTH_TYPE_RESTRICTED )
|
||||
{
|
||||
$badges[] = new Badge( Badge::BADGE_WARNING, 'album_friend_only_badge' );
|
||||
}
|
||||
|
||||
return $badges;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user