TractorCow\Colorpicker\Forms\ColorField
Color field
Synopsis
class ColorField
extends TextField
{
- // methods
- public void __construct()
- public void Field()
- public void Type()
- public bool validate()
- protected string getTextColorStyle()
Hierarchy
Extends
- SilverStripe\Forms\TextField
Methods
protected
- getTextColorStyle() — Calculate the text color style so that it's visible on the background
public
- __construct() — Returns a color field.
- Field()
- Type() — Override the type to get the proper class name on the field "text" is needed here to render the form field as a normal text-field
- validate() — Ensure the color is a valid hexadecimal color