29require_once DOL_DOCUMENT_ROOT .
'/core/lib/functions2.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
31require_once DOL_DOCUMENT_ROOT .
'/webportal/class/context.class.php';
42 public $primaryColorHex =
'#263c5c';
47 public $primaryColorHsl = array(
67 public $loginBackground;
72 public $bannerBackground;
77 public $bannerUseDarkTheme;
109 if (!empty(
$mysoc->logo_small) && is_readable(
$conf->mycompany->dir_output .
'/logos/thumbs/' .
$mysoc->logo_small)) {
110 $urllogo =
$context->getControllerUrl(
'viewimage') .
'&modulepart=mycompany&entity=' .
$conf->entity .
'&file=' . urlencode(
'logos/thumbs/' .
$mysoc->logo_small);
111 } elseif (!empty(
$mysoc->logo) && is_readable(
$conf->mycompany->dir_output .
'/logos/' .
$mysoc->logo)) {
112 $urllogo =
$context->getControllerUrl(
'viewimage') .
'&modulepart=mycompany&entity=' .
$conf->entity .
'&file=' . urlencode(
'logos/' .
$mysoc->logo);
113 } elseif (is_readable(DOL_DOCUMENT_ROOT .
'/public/webportal/img/dolibarr_logo.svg')) {
119 $this->menuLogoUrl =
getDolGlobalString(
'WEBPORTAL_MENU_LOGO_URL', $this->loginLogoUrl);
122 $this->bannerUseDarkTheme =
getDolGlobalInt(
'WEBPORTAL_BANNER_BACKGROUND_IS_DARK');
139 if (strpos($outColor,
'#') !== 0) {
140 $outColor =
'#'.$outColor;
145 $this->primaryColorHex = $outColor;
169 return DOL_DOCUMENT_ROOT .
'/public/webportal/img/icons';
static getInstance()
Singleton method to create one instance of this object.
static getRootConfigUrl()
Get WebPortal root url.
Class to manage third parties objects (customers, suppliers, prospects...)
static getIconImagesPath()
return current icons folder path
__construct($init=true)
Constructor.
loadPrimaryColor()
Load hex of primary theme color.
static getIconImagesUrl()
return current icons folder url
colorArrayToHex($arraycolor, $colorifnotfound='888888')
Convert an array with RGB value into hex RGB value.
colorStringToArray($stringcolor, $colorifnotfound=array(88, 88, 88))
Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,...
colorHexToHsl($hex, $alpha=false, $returnArray=false)
Color Hex to Hsl (used for style)
colorValidateHex($color, $allow_white=true)
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
$context
@method int call_trigger(string $triggerName, ?User $user)