function styleguide_palette_swatch_load in Style Guide 7
Loads a color swatch.
Parameters
int $swatch_id: The swatch ID.
Return value
array An associative array representing the color swatch with the following keys:
- id: The swatch ID.
- name: The swatch name.
- description: The swatch description.
- hex: The swatch hex value.
1 call to styleguide_palette_swatch_load()
- styleguide_palette_swatch_delete_form_submit in styleguide_palette/
styleguide_palette.admin.inc - Form submission handler for styleguide_palette_swatch_delete_form().
File
- styleguide_palette/
styleguide_palette.module, line 116 - Stores and displays color palettes and swatches.
Code
function styleguide_palette_swatch_load($swatch_id) {
return db_select('styleguide_palette_swatch', 's')
->fields('s')
->condition('id', $swatch_id)
->execute()
->fetchAssoc();
}