You are here

function apps_apps_add_theme in Apps 7

Changes the apps array by reference.

Adds #theme properties for a list view of the apps.

Parameters

array $apps: array of apps from apps_apps

1 call to apps_apps_add_theme()
apps_apps in ./apps.manifest.inc
Retrieve apps from the server manifest.

File

./apps.manifest.inc, line 170
Handles pulling and processing of app data from the server

Code

function apps_apps_add_theme(&$apps) {
  foreach ($apps as $id => $app) {

    // Add teaser theme,
    $apps[$id]['#theme'] = 'apps_app_teaser';

    // Add style name for image_style theming.
    if (!empty($apps[$id]['logo'])) {
      $apps[$id]['logo']['style_name'] = 'apps_logo';
    }
  }
  $apps['#theme'] = 'apps_list';
}