You are here

function sweaverThemeSettings::getCSS in Sweaver 7

Same name and namespace in other branches
  1. 6 tests/sweaver.themesettings.test \sweaverThemeSettings::getCSS()

Get css from table.

Parameters

$style_id: The number of the style.

$draft: Whether to query the draft or live table.

3 calls to sweaverThemeSettings::getCSS()
sweaverThemeSettings::sweaverDeleteStyle in tests/sweaver.themesettings.test
Delete a style.
sweaverThemeSettings::sweaverPublishStyle in tests/sweaver.themesettings.test
Publish a style.
sweaverThemeSettings::sweaverSaveStyle in tests/sweaver.themesettings.test
Save a style.

File

tests/sweaver.themesettings.test, line 207
Advanced tests for sweaver editor + theme settings.

Class

sweaverThemeSettings
@file Advanced tests for sweaver editor + theme settings.

Code

function getCSS($style_id, $draft = TRUE) {
  $table = $draft ? 'sweaver_style_draft' : 'sweaver_style';
  return db_query("SELECT * FROM {" . $table . "} where style_id = :style_id AND theme = :theme", array(
    ':style_id' => $style_id,
    ':theme' => 'bartik',
  ))
    ->fetchObject();
}