interface HexColorInterface in Color API 8
Interface for the Typed Data Hexadecimal Color Simple Data type.
Hierarchy
- interface \Drupal\Core\TypedData\PrimitiveInterface
- interface \Drupal\Core\TypedData\Type\StringInterface
- interface \Drupal\colorapi\Plugin\DataType\HexColorInterface
- interface \Drupal\Core\TypedData\Type\StringInterface
Expanded class hierarchy of HexColorInterface
All classes that implement HexColorInterface
1 file declares its use of HexColorInterface
- ColorapiService.php in src/
Service/ ColorapiService.php
File
- src/
Plugin/ DataType/ HexColorInterface.php, line 10
Namespace
Drupal\colorapi\Plugin\DataTypeView source
interface HexColorInterface extends StringInterface {
/**
* Regex used to validate hexadecimal color strings.
*
* @var string
*/
const HEXADECIMAL_COLOR_REGEX = '/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HexColorInterface:: |
constant | Regex used to validate hexadecimal color strings. | ||
PrimitiveInterface:: |
public | function | Gets the primitive data value casted to the correct PHP type. | 5 |
PrimitiveInterface:: |
public | function | Gets the primitive data value. | |
PrimitiveInterface:: |
public | function | Sets the primitive data value. |