public function getColorWithHash()
    {
        $color = $this->owner->Color;
        if (strpos($color, '#') === false) {
            return '#' . $color;
        } else {
            return $color;
        }
    }
public function getColorWithHash()
    {
        $color = $this->owner->Color;
        if (strpos($color, '#') === false) {
            return '#' . $color;
        } else {
            return $color;
        }
    }
public function getColorWithHash ( ) { $ color = $ this -> owner -> Color ; if ( strpos ( $ color , '#' ) === false ) { return '#' . $ color ; } else { return $ color ; } }
Getter that always returns the color with a hash
As the standard Silverstripe color picker seems to save colors without a hash,
this just makes sure that colors are always returned with a hash - whether they've been
saved with or without one
Getter that always returns the color with a hash As the standard Silverstripe color picker seems to save colors without a hash this just makes sure that colors are always returned with a hash - whether they ve been saved with or without one