Class humhub\modules\web\pwa\widgets\SiteIcon

Inheritancehumhub\modules\web\pwa\widgets\SiteIcon » humhub\components\Widget » yii\base\Widget
Available since version1.4

Class SiteIcon handles icons of the installation.

Those icons will be used to represent the application in components such as mobile apps, bookmarks, etc.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$render boolean If set to false this widget won't be rendered humhub\components\Widget
$widgetLayout string Defines an optional layout humhub\components\Widget

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getLayoutViewParams() Returns an array of view parameter used if \humhub\components\layout is set. humhub\components\Widget
getPath() humhub\modules\web\pwa\widgets\SiteIcon
getUrl() Returns the URL of the icon in desired size (width + height) humhub\modules\web\pwa\widgets\SiteIcon
process() Process is a wrapper for the run method humhub\components\Widget
registerMetaTags() humhub\modules\web\pwa\widgets\SiteIcon
set() Sets a new icon for the installation. humhub\modules\web\pwa\widgets\SiteIcon
widget() Creates a widget instance and runs it. humhub\components\Widget

Events

Hide inherited events

EventTypeDescriptionDefined By
EVENT_CREATE humhub\libs\WidgetCreateEvent An event raised before creating a widget. humhub\components\Widget

Property Details

$iconFolderPath protected static property
protected static $iconFolderPath '@webroot/uploads/icon'
$iconFolderUrl protected static property
protected static $iconFolderUrl '@web/uploads/icon'

Method Details

getPath() public static method

public static void getPath ( $size null )
$size
getUrl() public static method

Returns the URL of the icon in desired size (width + height)

public static string getUrl ( $size null, $autoResize true )
$size integer|null

If size is empty the original file will be returned

$autoResize boolean

Automatically resize to given size if not available yet

registerMetaTags() public static method

public static void registerMetaTags ( humhub\modules\ui\view\components\View $view )
$view humhub\modules\ui\view\components\View
set() public static method

Sets a new icon for the installation.

public static void set ( \yii\web\UploadedFile $file null )
$file \yii\web\UploadedFile|null