You are here

protected function AvailabilityCalendarsCssGenerator::getStyle in Availability Calendars 7.2

Same name and namespace in other branches
  1. 6.2 availability_calendars.styles.inc \AvailabilityCalendarsCssGenerator::getStyle()

Helper method to return 1 style setting (to not repeat the taking care of not being set, defaults, etc).

Parameters

string $category:

string|array $name:

mixed $default:

4 calls to AvailabilityCalendarsCssGenerator::getStyle()
AvailabilityCalendarsCssGenerator::addCssColorDeclaration in ./availability_calendars.styles.inc
Creates a CSS declaration for a color property.
AvailabilityCalendarsCssGenerator::addCssDeclaration in ./availability_calendars.styles.inc
Creates a CSS declaration.
AvailabilityCalendarsCssGenerator::addCssLengthDeclaration in ./availability_calendars.styles.inc
Creates a CSS declaration for a length property.
AvailabilityCalendarsCssGenerator::createStatesCss in ./availability_calendars.styles.inc

File

./availability_calendars.styles.inc, line 837

Class

AvailabilityCalendarsCssGenerator

Code

protected function getStyle($category, $name, $default = '') {
  if (is_array($name)) {
    $name = key($name);
  }
  return isset($this->styles[$category][$name]) && $this->styles[$category][$name] !== '<none>' ? $this->styles[$category][$name] : $default;
}