29require_once DOL_DOCUMENT_ROOT .
'/core/lib/functions2.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
41 public $primaryColorHex =
'#263c5c';
46 public $primaryColorHsl = array(
66 public $loginBackground;
71 public $bannerBackground;
76 public $bannerUseDarkTheme;
87 $mysoc->setMysoc(
$conf);
91 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
92 if (!empty($mysoc->logo_small) && is_readable(
$conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
93 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
94 } elseif (!empty($mysoc->logo) && is_readable(
$conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
95 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/'.$mysoc->logo);
96 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
97 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
101 $this->menuLogoUrl =
getDolGlobalString(
'WEBPORTAL_MENU_LOGO_URL', $this->loginLogoUrl);
104 $this->bannerUseDarkTheme =
getDolGlobalInt(
'WEBPORTAL_BANNER_BACKGROUND_IS_DARK');
121 if (strpos($outColor,
'#') !== 0) {
122 $outColor =
'#'.$outColor;
127 $this->primaryColorHex = $outColor;
Class to manage third parties objects (customers, suppliers, prospects...)
loadPrimaryColor()
Load hex of primary theme color.
__construct()
Constructor.
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...