Gets or defines the background property.

@param bool $background True to set background overlay, false otherwise.

@return mixed The background property, or $this.
18810
public function background($background = null)
    {
        // Return value
        if (is_null($background)) {
            return $this->background;
        }

        // Set value
        $this->background = $background;

        return $this;
    }
289457
public function setBackgroundColor($value)
    {
        if ($value instanceof Color) {
            $this->backgroundColor = $value;
        } else {
            $this->backgroundColor = Color::parse($value);
        }
        
        return $this;
    }
222484
public static function getBackgroundUrl( $style )
    {
        $patten = '/background(-image)?\s*:\s*url\s*\((?<source>[^\)]*)/';
        preg_match( $patten, $style, $backgroundImage );

        return trim( ArrayHelper::getValue( $backgroundImage, 'source', null ) );
    }
1246402
public function setOverride($theme = null) : ?Theme
    {
        if ($theme === null) {
            return $this->override = null;
        }

        if ($theme instanceof Theme) {
            $this->override = $theme;
        } elseif ($this->has($theme)) {
            $this->override = $this->get($theme);
        }

        if ($this->override === null || ($this->override !== null && !$this->override->verified())) {
            $this->override = $this->default;
        }

        return $this->override;
    }
1285450
public function materialDesignColorPaletteBackgroundFunction(array $args = []) {
        return $this->materialDesignColorPalette("bg", ArrayHelper::get($args, "name"), ArrayHelper::get($args, "value"));
    }
541447
public function getBool($prop) {

			// Get property
			$val = $this->get($prop);

			// String/numeric bool?
			if ($val === 'false') { 
				$val = false; 
			} elseif ($val === 'true') {
				$val = true;
			} elseif ($val === 1 || $val === '1') {
				$val = true;
			} elseif ($val === 0 || $val === '0') {
				$val = false;
			}




			// Boolean?
			if (is_bool($val))  {
				return $val;
			} else {
				return null;
			}

		}
301965
private function formatBlock($output, $background, $foreground, $large = false)
    {
        /** @var FormatterHelper $formatter */
        $formatter = $this->getApplication()->getHelperSet()->get('formatter');

        return $formatter->formatBlock($output, "bg={$background};fg={$foreground}", $large);
    }
870759
public function setBackgroundHexColor($backgroundHexColor)
    {
        if ( is_null($this->frontColor) ) {
            $this->backColor = new Color;
        }

        $this->backColor->hex($backgroundHexColor);

        return $this;
    }
799563
public void setBackground(Background background) {

        switch (background) {
            case BLUE:
                m_backgroundStyle.setValue(I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().itemBlue());
                break;
            case RED:
                m_backgroundStyle.setValue(I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().itemRed());
                break;
            case YELLOW:
                m_backgroundStyle.setValue(I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().itemYellow());
                break;
            case DEFAULT:
            default:
                m_backgroundStyle.setValue(null);
        }
    }
369674
public function convertBackgroundRepeat($css)
    {
        switch ($css) {
            case 'repeat':
                return array(true, true);
            case 'repeat-x':
                return array(true, false);
            case 'repeat-y':
                return array(false, true);
            case 'no-repeat':
                return array(false, false);
        }
        return null;
    }
898717
protected function setColor(ColorInterface $color, bool $background = null): FormatterInterface
    {
        $name = $color->getName();
        $colors = $this->getColors();
        if (array_key_exists($name, $colors) === false) {
            throw new ColorNotSupported($color);
        }

        if ($background === true) {
            $this->background = $colors[$name] + 10;
        } else {
            $this->foreground = $colors[$name];
        }

        return $this;
    }
787673
public static function getBackgroundCode($backgroundColour)
    {
        if (!isset(self::$background_colours[$backgroundColour])) {
            throw new \Exception('Invalid background colour.');
        }
        return "\033[" . self::$background_colours[$backgroundColour] . 'm';
    }
505476
public function setEnvironment($environment = '')
    {
        // Set the application environment
        $environment = ($environment ?: strtolower(getenv('APPLICATION_ENV')));
        $environment = ($environment ?: 'default');

        // Set the application environment
        $this->set('env', $environment);

        return $this;
    }
1352370
public function parent($parent = false)
    {
        if ($parent) {
            $this->parents = !is_array($parent) ? [$parent] : $parent;

            if (func_num_args() > 1) {
                $this->parents = func_get_args();
            }
        }

        return $this;
    }
111128
public function disableReset(bool $disable = true)
    {
        $this->builder()->getFooter()->disableReset($disable);

        return $this;
    }
303828
public function convertBackgroundColor($css)
    {
        $res = null;
        if ($css === 'transparent') {
            return null;
        }

        return $this->convertToColor($css, $res);
    }
503464
public function disableCreatingCheck(bool $disable = true)
    {
        $this->builder()->getFooter()->disableCreatingCheck($disable);

        return $this;
    }