FOF30\Form\Field\Color::getRepeatable PHP Method

getRepeatable() public method

in a view listing many item (typically a "browse" task)
Since: 2.0
public getRepeatable ( ) : string
return string The field HTML
    public function getRepeatable()
    {
        if (isset($this->element['legacy'])) {
            return $this->getInput();
        }
        $class = $this->class ? $this->class : '';
        $hexColor = '#' . ltrim($this->value, '#');
        return '<div class="' . $this->id . ' ' . $class . '" style="width:20px; height:20px; background-color:' . $hexColor . ';">' . '</div>';
    }