2007-05-22 05:52:17 +00:00
< ? php
/**
2007-08-26 16:41:02 +00:00
* @ file
* Admin page callbacks for the system module .
*/
2014-10-29 08:59:56 +00:00
use Drupal\Component\Utility\Html ;
2014-03-31 17:37:55 +00:00
use Drupal\Core\Render\Element ;
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
use Drupal\Core\Template\Attribute ;
2007-08-26 16:41:02 +00:00
/**
2014-02-24 09:47:14 +00:00
* Prepares variables for administrative content block templates .
*
* Default template : admin - block - content . html . twig .
2007-08-26 16:41:02 +00:00
*
2009-10-09 01:00:08 +00:00
* @ param $variables
* An associative array containing :
2010-10-01 15:24:18 +00:00
* - content : An array containing information about the block . Each element
* of the array represents an administrative menu item , and must at least
2014-02-24 09:47:14 +00:00
* contain the keys 'title' , 'link_path' , and 'localized_options' , which are
2010-10-01 15:24:18 +00:00
* passed to l () . A 'description' key may also be provided .
2007-08-26 16:41:02 +00:00
*/
2014-02-24 09:47:14 +00:00
function template_preprocess_admin_block_content ( & $variables ) {
if ( ! empty ( $variables [ 'content' ])) {
2014-10-05 15:56:28 +00:00
$variables [ 'compact' ] = system_admin_compact_mode ();
2014-02-24 09:47:14 +00:00
foreach ( $variables [ 'content' ] as $key => $item ) {
2014-09-29 13:41:29 +00:00
$variables [ 'content' ][ $key ][ 'link' ] = \Drupal :: l ( $item [ 'title' ], $item [ 'url' ]);
2014-10-05 15:56:28 +00:00
if ( ! $variables [ 'compact' ] && isset ( $item [ 'description' ])) {
2015-07-11 08:10:48 +00:00
$variables [ 'content' ][ $key ][ 'description' ] = [ '#markup' => $item [ 'description' ]];
2014-02-24 09:47:14 +00:00
}
else {
$variables [ 'content' ][ $key ][ 'description' ] = FALSE ;
2010-10-01 15:24:18 +00:00
}
2007-08-26 16:41:02 +00:00
}
}
}
/**
2014-03-12 19:20:46 +00:00
* Prepares variables for administrative index page templates .
*
* Default template : admin - page . html . twig .
2007-08-26 16:41:02 +00:00
*
2009-10-09 01:00:08 +00:00
* @ param $variables
* An associative array containing :
* - blocks : An array of blocks to display . Each array should include a
2010-04-13 15:23:03 +00:00
* 'title' , a 'description' , a formatted 'content' and a 'position' which
* will control which container it will be in . This is usually 'left' or
* 'right' .
2007-08-26 16:41:02 +00:00
*/
2014-03-12 19:20:46 +00:00
function template_preprocess_admin_page ( & $variables ) {
$variables [ 'system_compact_link' ] = array (
Issue #1833932 by lauriii, lokapujya, cilefen, Cottser, joelpittet, jenlampton, iMiksu, lanchez, ericrdb, mikispeed, Eric_A, mikemiles86: Convert theme_system_compact_link() into a #type link
2014-11-25 21:59:10 +00:00
'#type' => 'system_compact_link' ,
2014-03-12 19:20:46 +00:00
);
$variables [ 'containers' ] = array ();
2007-08-26 16:41:02 +00:00
$stripe = 0 ;
2014-03-12 19:20:46 +00:00
foreach ( $variables [ 'blocks' ] as $block ) {
if ( ! empty ( $block [ 'content' ][ '#content' ])) {
2007-08-26 16:41:02 +00:00
if ( empty ( $block [ 'position' ])) {
2014-03-12 19:20:46 +00:00
// Perform automatic striping.
2007-08-26 16:41:02 +00:00
$block [ 'position' ] = ++ $stripe % 2 ? 'left' : 'right' ;
}
2014-03-12 19:20:46 +00:00
$variables [ 'containers' ][ $block [ 'position' ]][ 'blocks' ][] = array (
'#theme' => 'admin_block' ,
'#block' => $block ,
);
2007-08-26 16:41:02 +00:00
}
}
}
/**
2014-04-30 18:37:39 +00:00
* Prepares variables for admin index templates .
*
* Default template : system - admin - index . html . twig .
2007-12-06 09:58:34 +00:00
*
2009-10-09 01:00:08 +00:00
* @ param $variables
* An associative array containing :
* - menu_items : An array of modules to be displayed .
2007-08-26 16:41:02 +00:00
*/
2014-04-30 18:37:39 +00:00
function template_preprocess_system_admin_index ( & $variables ) {
$variables [ 'system_compact_link' ] = array (
Issue #1833932 by lauriii, lokapujya, cilefen, Cottser, joelpittet, jenlampton, iMiksu, lanchez, ericrdb, mikispeed, Eric_A, mikemiles86: Convert theme_system_compact_link() into a #type link
2014-11-25 21:59:10 +00:00
'#type' => 'system_compact_link' ,
2014-04-30 18:37:39 +00:00
);
$variables [ 'containers' ] = array ();
$stripe = 0 ;
2010-04-22 09:54:26 +00:00
// Iterate over all modules.
2014-04-30 18:37:39 +00:00
foreach ( $variables [ 'menu_items' ] as $module => $block ) {
2007-08-26 16:41:02 +00:00
list ( $description , $items ) = $block ;
2014-04-30 18:37:39 +00:00
$position = ++ $stripe % 2 ? 'left' : 'right' ;
2010-04-22 09:54:26 +00:00
// Output links.
2007-08-26 16:41:02 +00:00
if ( count ( $items )) {
2014-04-30 18:37:39 +00:00
$variables [ 'containers' ][ $position ][] = array (
2013-09-25 07:49:11 +00:00
'#theme' => 'admin_block' ,
2014-04-30 18:37:39 +00:00
'#block' => array (
'position' => $position ,
'title' => $module ,
'content' => array (
'#theme' => 'admin_block_content' ,
'#content' => $items ,
),
'description' => t ( $description ),
),
2013-09-25 07:49:11 +00:00
);
2007-08-26 16:41:02 +00:00
}
}
}
/**
2014-01-26 05:11:21 +00:00
* Prepares variables for status report template .
*
* Default template : status - report . html . twig .
2007-08-30 15:31:46 +00:00
*
2013-10-31 12:42:26 +00:00
* This theme function is dependent on install . inc being loaded , because
* that ' s where the constants are defined .
*
2009-10-09 01:00:08 +00:00
* @ param $variables
* An associative array containing :
2013-10-31 12:42:26 +00:00
* - requirements : An array of requirements / status items . Each requirement
* is an associative array containing the following elements :
* - title : The name of the requirement .
* - value : ( optional ) The current value ( version , time , level , etc ) .
* - description : ( optional ) The description of the requirement .
* - severity : ( optional ) The requirement ' s result / severity level , one of :
* - REQUIREMENT_INFO : Status information .
* - REQUIREMENT_OK : The requirement is satisfied .
* - REQUIREMENT_WARNING : The requirement failed with a warning .
* - REQUIREMENT_ERROR : The requirement failed with an error .
2007-08-26 16:41:02 +00:00
*/
2014-01-26 05:11:21 +00:00
function template_preprocess_status_report ( & $variables ) {
2010-10-09 05:18:53 +00:00
$severities = array (
REQUIREMENT_INFO => array (
'title' => t ( 'Info' ),
2014-10-05 15:56:28 +00:00
'status' => 'info' ,
2010-10-09 05:18:53 +00:00
),
REQUIREMENT_OK => array (
'title' => t ( 'OK' ),
2014-10-05 15:56:28 +00:00
'status' => 'ok' ,
2010-10-09 05:18:53 +00:00
),
REQUIREMENT_WARNING => array (
'title' => t ( 'Warning' ),
2014-10-05 15:56:28 +00:00
'status' => 'warning' ,
2010-10-09 05:18:53 +00:00
),
REQUIREMENT_ERROR => array (
'title' => t ( 'Error' ),
2014-10-05 15:56:28 +00:00
'status' => 'error' ,
2010-10-09 05:18:53 +00:00
),
);
2014-01-26 05:11:21 +00:00
foreach ( $variables [ 'requirements' ] as $i => $requirement ) {
2013-08-05 15:59:11 +00:00
// Always use the explicit requirement severity, if defined. Otherwise,
// default to REQUIREMENT_OK in the installer to visually confirm that
// installation requirements are met. And default to REQUIREMENT_INFO to
// denote neutral information without special visualization.
if ( isset ( $requirement [ 'severity' ])) {
$severity = $severities [( int ) $requirement [ 'severity' ]];
}
elseif ( defined ( 'MAINTENANCE_MODE' ) && MAINTENANCE_MODE == 'install' ) {
$severity = $severities [ REQUIREMENT_OK ];
}
else {
$severity = $severities [ REQUIREMENT_INFO ];
}
2014-01-26 05:11:21 +00:00
$variables [ 'requirements' ][ $i ][ 'severity_title' ] = $severity [ 'title' ];
2014-10-05 15:56:28 +00:00
$variables [ 'requirements' ][ $i ][ 'severity_status' ] = $severity [ 'status' ];
2007-08-26 16:41:02 +00:00
}
}
/**
2015-10-06 06:04:49 +00:00
* Prepares variables for the module details templates .
*
* Default template : system - modules - details . html . twig .
2007-08-30 15:31:46 +00:00
*
2009-10-09 01:00:08 +00:00
* @ param $variables
* An associative array containing :
2015-10-06 06:04:49 +00:00
* - form : A render element representing the form . The main form element
* represents a package , and child elements of the form are individual
* projects . Each project ( or module ) is an associative array containing the
* following elements :
* - name : The name of the module .
* - enable : A checkbox for enabling the module .
* - description : A description of the module .
* - version : The version of the module .
* - links : Administration links provided by the module .
* - #requires: A list of modules that the project requires.
* - #required_by: A list of modules that require the project.
* - #attributes: A list of attributes for the module wrapper.
2009-10-09 01:00:08 +00:00
*
2015-10-06 06:04:49 +00:00
* @ see \Drupal\system\Form\ModulesListForm
2007-08-26 16:41:02 +00:00
*/
2015-10-06 06:04:49 +00:00
function template_preprocess_system_modules_details ( & $variables ) {
2009-10-09 01:00:08 +00:00
$form = $variables [ 'form' ];
2015-10-06 06:04:49 +00:00
$variables [ 'modules' ] = [];
2012-11-27 07:06:47 +00:00
// Iterate through all the modules, which are children of this element.
2014-03-31 17:37:55 +00:00
foreach ( Element :: children ( $form ) as $key ) {
Issue #1790280 by nod_, Bojhan, Wim Leers, danillonunes, deviantintegral, Kiphaas7, benjifisher, sun, yoroy, Everett Zufelt, jenlampton, aspilicious: Module page redesign 2.0.
2012-11-21 19:35:03 +00:00
// Stick the key into $module for easier access.
2008-07-23 07:37:06 +00:00
$module = $form [ $key ];
unset ( $module [ 'enable' ][ '#title' ]);
Issue #1790280 by nod_, Bojhan, Wim Leers, danillonunes, deviantintegral, Kiphaas7, benjifisher, sun, yoroy, Everett Zufelt, jenlampton, aspilicious: Module page redesign 2.0.
2012-11-21 19:35:03 +00:00
$module [ '#requires' ] = array_filter ( $module [ '#requires' ]);
$module [ '#required_by' ] = array_filter ( $module [ '#required_by' ]);
2015-10-06 06:04:49 +00:00
// Add the checkbox to allow installing new modules and to show the
// installation status of the module.
$module [ 'checkbox' ] = $module [ 'enable' ];
Issue #1790280 by nod_, Bojhan, Wim Leers, danillonunes, deviantintegral, Kiphaas7, benjifisher, sun, yoroy, Everett Zufelt, jenlampton, aspilicious: Module page redesign 2.0.
2012-11-21 19:35:03 +00:00
2015-04-02 10:59:11 +00:00
// Add the module label and expand/collapse functionality.
2014-10-29 08:59:56 +00:00
$id = Html :: getUniqueId ( 'module-' . $key );
2015-10-06 06:04:49 +00:00
$module [ 'id' ] = $id ;
$module [ 'enable_id' ] = $module [ 'enable' ][ '#id' ];
Issue #1790280 by nod_, Bojhan, Wim Leers, danillonunes, deviantintegral, Kiphaas7, benjifisher, sun, yoroy, Everett Zufelt, jenlampton, aspilicious: Module page redesign 2.0.
2012-11-21 19:35:03 +00:00
2015-10-06 06:04:49 +00:00
// @todo Remove early rendering and use safe_join in the Twig template once
// https://www.drupal.org/node/2579091 is fixed.
2015-09-15 12:47:50 +00:00
$renderer = \Drupal :: service ( 'renderer' );
$machine_name_render = [
'#prefix' => '<span dir="ltr" class="table-filter-text-source">' ,
'#plain_text' => $key ,
2015-10-06 06:04:49 +00:00
'#suffix' => '</span>' ,
2015-09-15 12:47:50 +00:00
];
2015-10-06 06:04:49 +00:00
$module [ 'machine_name' ] = $renderer -> render ( $machine_name_render );
if ( ! empty ( $module [ '#requires' ])) {
2015-09-15 12:47:50 +00:00
$requires = [
'#theme' => 'item_list' ,
'#items' => $module [ '#requires' ],
'#context' => [ 'list_style' => 'comma-list' ],
];
2015-10-06 06:04:49 +00:00
$module [ 'requires' ] = $renderer -> render ( $requires );
2015-08-05 04:19:04 +00:00
}
2015-10-06 06:04:49 +00:00
if ( ! empty ( $module [ '#required_by' ])) {
2015-09-15 12:47:50 +00:00
$required_by = [
'#theme' => 'item_list' ,
'#items' => $module [ '#required_by' ],
'#context' => [ 'list_style' => 'comma-list' ],
];
2015-10-06 06:04:49 +00:00
$module [ 'required_by' ] = $renderer -> render ( $required_by );
2008-07-23 07:37:06 +00:00
}
2015-10-06 06:04:49 +00:00
if ( ! empty ( $module [ 'version' ])) {
$module [ 'version' ] = $renderer -> render ( $module [ 'version' ]);
Issue #1790280 by nod_, Bojhan, Wim Leers, danillonunes, deviantintegral, Kiphaas7, benjifisher, sun, yoroy, Everett Zufelt, jenlampton, aspilicious: Module page redesign 2.0.
2012-11-21 19:35:03 +00:00
}
2015-10-06 06:04:49 +00:00
$module [ 'attributes' ] = new Attribute ( $module [ '#attributes' ]);
$variables [ 'modules' ][] = $module ;
2007-08-26 16:41:02 +00:00
}
2008-07-23 07:37:06 +00:00
}
2007-08-26 16:41:02 +00:00
/**
2015-10-07 06:54:02 +00:00
* Prepares variables for module uninstall templates .
*
* Default template : system - modules - uninstall . html . twig .
2009-10-09 01:00:08 +00:00
*
* @ param $variables
* An associative array containing :
2015-10-07 06:54:02 +00:00
* - form : A render element representing the form . Child elements of the form
* are individual modules . Each module is an associative array containing
* the following elements :
* - #module_name: The name of the module as a string.
* - name : The name of the module in a renderable array .
* - description : A description of the module .
* - #required_by: (optional) A list of modules that require the module.
* - #validation_reasons: (optional) Additional reasons why the module
* cannot be uninstalled .
* - #attributes: A list of attributes for the module wrapper.
2009-10-09 01:00:08 +00:00
*
2010-04-13 15:23:03 +00:00
* @ ingroup themeable
2007-08-26 16:41:02 +00:00
*/
2015-10-07 06:54:02 +00:00
function template_preprocess_system_modules_uninstall ( & $variables ) {
2009-10-09 01:00:08 +00:00
$form = $variables [ 'form' ];
2015-10-07 06:54:02 +00:00
$variables [ 'modules' ] = [];
2009-10-09 01:00:08 +00:00
2015-10-07 06:54:02 +00:00
// Iterate through all the modules, which are children of this element.
foreach ( Element :: children ( $form [ 'modules' ]) as $key ) {
$module = $form [ 'modules' ][ $key ];
$module [ 'module_name' ] = $module [ '#module_name' ];
$module [ 'checkbox' ] = $form [ 'uninstall' ][ $key ];
$module [ 'checkbox_id' ] = $form [ 'uninstall' ][ $key ][ '#id' ];
2007-08-26 16:41:02 +00:00
2015-10-07 06:54:02 +00:00
if ( ! empty ( $module [ '#validation_reasons' ])) {
$module [ 'validation_reasons' ] = $module [ '#validation_reasons' ];
$module [ 'reasons_count' ] = count ( $module [ 'validation_reasons' ]);
2010-11-20 03:34:30 +00:00
}
2015-10-07 06:54:02 +00:00
else {
$module [ 'reasons_count' ] = 0 ;
2010-11-20 03:34:30 +00:00
}
2015-10-07 06:54:02 +00:00
if ( ! empty ( $module [ '#required_by' ])) {
$module [ 'required_by' ] = $module [ '#required_by' ];
$module [ 'reasons_count' ] = $module [ 'reasons_count' ] + 1 ;
}
$module [ 'attributes' ] = new Attribute ( $module [ '#attributes' ]);
$variables [ 'modules' ][] = $module ;
2007-08-26 16:41:02 +00:00
}
}
/**
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
* Prepares variables for appearance page templates .
*
* Default template : system - themes - page . html . twig .
2007-08-26 16:41:02 +00:00
*
2009-10-09 01:00:08 +00:00
* @ param $variables
* An associative array containing :
2009-12-01 00:39:35 +00:00
* - theme_groups : An associative array containing groups of themes .
2013-09-25 07:49:11 +00:00
* - theme_group_titles : An associative array containing titles of themes .
2007-08-26 16:41:02 +00:00
*/
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
function template_preprocess_system_themes_page ( & $variables ) {
$groups = array ();
2009-12-01 00:39:35 +00:00
$theme_groups = $variables [ 'theme_groups' ];
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$variables [ 'attributes' ][ 'id' ] = 'system-themes-page' ;
2009-12-01 00:39:35 +00:00
foreach ( $variables [ 'theme_group_titles' ] as $state => $title ) {
if ( ! count ( $theme_groups [ $state ])) {
// Skip this group of themes if no theme is there.
2007-08-26 16:41:02 +00:00
continue ;
}
2009-12-01 00:39:35 +00:00
// Start new theme group.
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$theme_group = array ();
$theme_group [ 'state' ] = $state ;
$theme_group [ 'title' ] = $title ;
$theme_group [ 'themes' ] = array ();
2014-10-05 15:56:28 +00:00
$theme_group [ 'attributes' ] = new Attribute ();
2007-08-26 16:41:02 +00:00
2010-09-28 02:30:32 +00:00
foreach ( $theme_groups [ $state ] as $theme ) {
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$current_theme = array ();
2007-08-26 16:41:02 +00:00
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
// Screenshot depicting the theme.
2013-07-10 18:37:49 +00:00
if ( $theme -> screenshot ) {
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$current_theme [ 'screenshot' ] = array (
2013-07-10 18:37:49 +00:00
'#theme' => 'image' ,
'#uri' => $theme -> screenshot [ 'uri' ],
'#alt' => $theme -> screenshot [ 'alt' ],
'#title' => $theme -> screenshot [ 'title' ],
'#attributes' => $theme -> screenshot [ 'attributes' ],
);
}
else {
2014-03-27 06:09:10 +00:00
$current_theme [ 'screenshot' ] = array (
'#theme' => 'image' ,
'#uri' => drupal_get_path ( 'module' , 'system' ) . '/images/no_screenshot.png' ,
'#alt' => t ( 'No screenshot' ),
'#title' => t ( 'No screenshot' ),
'#attributes' => new Attribute ( array ( 'class' => array ( 'no-screenshot' ))),
);
2013-07-10 18:37:49 +00:00
}
2007-08-26 16:41:02 +00:00
2009-12-01 00:39:35 +00:00
// Localize the theme description.
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$current_theme [ 'description' ] = t ( $theme -> info [ 'description' ]);
2009-12-01 00:39:35 +00:00
2014-10-05 15:56:28 +00:00
$current_theme [ 'attributes' ] = new Attribute ();
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$current_theme [ 'name' ] = $theme -> info [ 'name' ];
$current_theme [ 'version' ] = isset ( $theme -> info [ 'version' ]) ? $theme -> info [ 'version' ] : '' ;
$current_theme [ 'notes' ] = $theme -> notes ;
2014-10-05 15:56:28 +00:00
$current_theme [ 'is_default' ] = $theme -> is_default ;
$current_theme [ 'is_admin' ] = $theme -> is_admin ;
2009-12-01 00:39:35 +00:00
// Make sure to provide feedback on compatibility.
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$current_theme [ 'incompatible' ] = '' ;
2009-12-01 00:39:35 +00:00
if ( ! empty ( $theme -> incompatible_core )) {
2015-07-27 11:35:14 +00:00
$current_theme [ 'incompatible' ] = t ( " This theme is not compatible with Drupal @core_version. Check that the .info.yml file contains the correct 'core' value. " , [ '@core_version' => \Drupal :: CORE_COMPATIBILITY ]);
}
elseif ( ! empty ( $theme -> incompatible_region )) {
$current_theme [ 'incompatible' ] = t ( " This theme is missing a 'content' region. " );
2009-12-01 00:39:35 +00:00
}
elseif ( ! empty ( $theme -> incompatible_php )) {
if ( substr_count ( $theme -> info [ 'php' ], '.' ) < 2 ) {
$theme -> info [ 'php' ] .= '.*' ;
}
2015-09-15 12:47:50 +00:00
$current_theme [ 'incompatible' ] = t ( 'This theme requires PHP version @php_required and is incompatible with PHP version @php_version.' , array ( '@php_required' => $theme -> info [ 'php' ], '@php_version' => phpversion ()));
2009-12-01 00:39:35 +00:00
}
2012-08-06 13:18:08 +00:00
elseif ( ! empty ( $theme -> incompatible_base )) {
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$current_theme [ 'incompatible' ] = t ( 'This theme requires the base theme @base_theme to operate correctly.' , array ( '@base_theme' => $theme -> info [ 'base theme' ]));
2012-08-06 13:18:08 +00:00
}
elseif ( ! empty ( $theme -> incompatible_engine )) {
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$current_theme [ 'incompatible' ] = t ( 'This theme requires the theme engine @theme_engine to operate correctly.' , array ( '@theme_engine' => $theme -> info [ 'engine' ]));
2009-12-01 00:39:35 +00:00
}
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
// Build operation links.
$current_theme [ 'operations' ] = array (
'#theme' => 'links' ,
'#links' => $theme -> operations ,
'#attributes' => array (
'class' => array ( 'operations' , 'clearfix' ),
),
);
$theme_group [ 'themes' ][] = $current_theme ;
2007-08-26 16:41:02 +00:00
}
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$groups [] = $theme_group ;
2007-08-26 16:41:02 +00:00
}
Issue #2151119 by joelpittet, InternetDevels, jamesrutherford, Cottser, idflood, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_themes_page() to Twig.
2014-03-07 22:30:43 +00:00
$variables [ 'theme_groups' ] = $groups ;
2008-08-21 19:36:39 +00:00
}