You are here

interface HexColorInterface in Color API 8

Interface for the Typed Data Hexadecimal Color Simple Data type.

Hierarchy

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\DataType
View 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

Namesort descending Modifiers Type Description Overrides
HexColorInterface::HEXADECIMAL_COLOR_REGEX constant Regex used to validate hexadecimal color strings.
PrimitiveInterface::getCastedValue public function Gets the primitive data value casted to the correct PHP type. 5
PrimitiveInterface::getValue public function Gets the primitive data value.
PrimitiveInterface::setValue public function Sets the primitive data value.