Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

get_tile_custom_style()

Description

Generate custom CSS style for a dashboard tile background color.

Parameters

ColumnTypeDefaultDescription
$buildstring array An associative array containing tile style properties, including 'tlstylecolour' for the background color.

Return

string A CSS style string for the background color (e.g., "background-color: #FFFFFF;"), or an empty string if no color is specified.

Location

include/dash_functions.php lines 1710 to 1727

Definition

 
function get_tile_custom_style($buildstring)
    {
    if (isset(
$buildstring['tlstylecolour']))
        {
        
$return_value="background-color: ";
        if (
preg_match('/^[a-fA-F0-9]+$/',$buildstring['tlstylecolour']))
            {
            
// this is a fix for supporting legacy hex values that do not have '#' at start
            
$return_value.='#';
            }
        
$return_value.=$buildstring['tlstylecolour'] . ';';
        return 
$return_value;
        }
    else
        {
        return 
'';
        }
    }

This article was last updated 12th December 2024 20:35 Europe/London time based on the source file dated 12th December 2024 19:40 Europe/London time.