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

GetThemesFromRequest()

Description

Get a themes array

Parameters

ColumnTypeDefaultDescription
$levels int Number of levels to parse from request

Return

array Array containing names of themes matching the syntax used in the collection table i.e. theme, theme2, theme3

Location

include/collections_functions.php lines 4682 to 4701

Definition

 
function GetThemesFromRequest($levels)
    {
    
$themes = array();
    for(
$n 0$n <= $levels$n++)
        {
        
$themeindex = ($n == "" $n);
        
$themename getval("theme$themeindex","");
        if(
$themename != "")
            {
            
$themes[] = $themename;
            }
        
// Legacy inconsistency when naming themes params. Sometimes the root theme was also named theme1. We check if theme 
        // is found, but if not, we just go to theme1 rather than break.
        
elseif(!($themeindex == && $themename == ""))
            {
            break;    
            }
        }           
    return 
$themes;
    }

This article was last updated 8th December 2024 20:35 Europe/London time based on the source file dated 4th December 2024 16:35 Europe/London time.