Changeset View
Changeset View
Standalone View
Standalone View
plugins/libkolab/lib/kolab_storage_folder_api.php
Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | abstract class kolab_storage_folder_api | ||||
* | * | ||||
* @param string Default color value to return if not set | * @param string Default color value to return if not set | ||||
* @return mixed Color value from IMAP metadata or $default is not set | * @return mixed Color value from IMAP metadata or $default is not set | ||||
*/ | */ | ||||
public function get_color($default = null) | public function get_color($default = null) | ||||
{ | { | ||||
// color is defined in folder METADATA | // color is defined in folder METADATA | ||||
$metadata = $this->get_metadata(); | $metadata = $this->get_metadata(); | ||||
if (($color = $metadata[kolab_storage::COLOR_KEY_PRIVATE]) || ($color = $metadata[kolab_storage::COLOR_KEY_SHARED])) { | if (($color = $metadata[kolab_storage::COLOR_KEY_PRIVATE] ?? null) || ($color = $metadata[kolab_storage::COLOR_KEY_SHARED] ?? null)) { | ||||
return $color; | return $color; | ||||
} | } | ||||
return $default; | return $default; | ||||
} | } | ||||
/** | /** | ||||
* Returns IMAP metadata/annotations (GETMETADATA/GETANNOTATION) | * Returns IMAP metadata/annotations (GETMETADATA/GETANNOTATION) | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |