You are here

protected function AvailabilityCalendarCssGenerator::addCssColorDeclaration in Availability Calendars 7.4

Same name and namespace in other branches
  1. 7.5 availability_calendar.styles.inc \AvailabilityCalendarCssGenerator::addCssColorDeclaration()
  2. 7.3 availability_calendar.styles.inc \AvailabilityCalendarCssGenerator::addCssColorDeclaration()

Creates a CSS declaration for a color property.

See also

addCssDeclaration for param and return info.

6 calls to AvailabilityCalendarCssGenerator::addCssColorDeclaration()
AvailabilityCalendarCssGenerator::createDaysCss in ./availability_calendar.styles.inc
AvailabilityCalendarCssGenerator::createHeaderCss in ./availability_calendar.styles.inc
AvailabilityCalendarCssGenerator::createStatesCss in ./availability_calendar.styles.inc
AvailabilityCalendarCssGenerator::createStatesRtlCss in ./availability_calendar.styles.inc
AvailabilityCalendarCssGenerator::createTableCss in ./availability_calendar.styles.inc

... See full list

File

./availability_calendar.styles.inc, line 1060

Class

AvailabilityCalendarCssGenerator

Code

protected function addCssColorDeclaration($category, $name) {
  $value = $this
    ->getStyle($category, $name);

  // Color codes may be given without #
  if (!empty($value) && ctype_xdigit($value)) {
    $value = '#' . $value;
  }
  return $this
    ->cssDeclaration($name, $value);
}