interface RgbColorInterface in Color API 8
Interface for the Typed Data RGB Color Complex Data type.
Hierarchy
- interface \Drupal\Core\TypedData\TypedDataInterface
- interface \Drupal\Core\TypedData\TraversableTypedDataInterface extends \Drupal\Core\TypedData\Traversable
- interface \Drupal\Core\TypedData\ComplexDataInterface
- interface \Drupal\colorapi\Plugin\DataType\RgbColorInterface
- interface \Drupal\Core\TypedData\ComplexDataInterface
- interface \Drupal\Core\TypedData\TraversableTypedDataInterface extends \Drupal\Core\TypedData\Traversable
Expanded class hierarchy of RgbColorInterface
All classes that implement RgbColorInterface
File
- src/
Plugin/ DataType/ RgbColorInterface.php, line 10
Namespace
Drupal\colorapi\Plugin\DataTypeView source
interface RgbColorInterface extends ComplexDataInterface {
/**
* Set 'red' property of the RGB object.
*
* @param string $red
* The value for the RGB "red" property. An integer between 0 and 255.
* @param bool $notify
* Whether to notify the parent object of the change. Defaults to TRUE. If a
* property is updated from a parent object, set it to FALSE to avoid being
* notified again.
*/
public function setRed($red, $notify = TRUE);
/**
* Retrieve 'Red' value of the RGB data object.
*
* @return array
* The value for "red" value. An integer between 0 and 255.
*/
public function getRed();
/**
* Set 'green' property of the RGB object.
*
* @param string $green
* The value for the RGB "green" property. An integer between 0 and 255.
* @param bool $notify
* Whether to notify the parent object of the change. Defaults to TRUE. If a
* property is updated from a parent object, set it to FALSE to avoid being
* notified again.
*/
public function setGreen($green, $notify = TRUE);
/**
* Retrieve 'Green' value of the RGB data object.
*
* @return array
* The value for "green" value. An integer between 0 and 255.
*/
public function getGreen();
/**
* Set 'blue' property of the RGB object.
*
* @param string $blue
* The value for the RGB "blue" property. An integer between 0 and 255.
* @param bool $notify
* Whether to notify the parent object of the change. Defaults to TRUE. If a
* property is updated from a parent object, set it to FALSE to avoid being
* notified again.
*/
public function setBlue($blue, $notify = TRUE);
/**
* Retrieve 'blue' value of the RGB data object.
*
* @return array
* The value for "blue" value. An integer between 0 and 255.
*/
public function getBlue();
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ComplexDataInterface:: |
public | function | Gets a property object. | 2 |
ComplexDataInterface:: |
public | function |
Gets the data definition. Overrides TypedDataInterface:: |
|
ComplexDataInterface:: |
public | function | Gets an array of property objects. | 3 |
ComplexDataInterface:: |
public | function | Determines whether the data structure is empty. | 2 |
ComplexDataInterface:: |
public | function | Sets a property value. | 3 |
ComplexDataInterface:: |
public | function | Returns an array of all property values. | 2 |
RgbColorInterface:: |
public | function | Retrieve 'blue' value of the RGB data object. | 1 |
RgbColorInterface:: |
public | function | Retrieve 'Green' value of the RGB data object. | 1 |
RgbColorInterface:: |
public | function | Retrieve 'Red' value of the RGB data object. | 1 |
RgbColorInterface:: |
public | function | Set 'blue' property of the RGB object. | 1 |
RgbColorInterface:: |
public | function | Set 'green' property of the RGB object. | 1 |
RgbColorInterface:: |
public | function | Set 'red' property of the RGB object. | 1 |
TraversableTypedDataInterface:: |
public | function | React to changes to a child property or item. | 4 |
TypedDataInterface:: |
public | function | Applies the default value. | 1 |
TypedDataInterface:: |
public static | function | Constructs a TypedData object given its definition and context. | 1 |
TypedDataInterface:: |
public | function | Gets a list of validation constraints. | 1 |
TypedDataInterface:: |
public | function | Returns the name of a property or item. | 1 |
TypedDataInterface:: |
public | function | Returns the parent data structure; i.e. either complex data or a list. | 1 |
TypedDataInterface:: |
public | function | Returns the property path of the data. | 1 |
TypedDataInterface:: |
public | function | Returns the root of the typed data tree. | 1 |
TypedDataInterface:: |
public | function | Returns a string representation of the data. | 1 |
TypedDataInterface:: |
public | function | Gets the data value. | 1 |
TypedDataInterface:: |
public | function | Sets the context of a property or item via a context aware parent. | 1 |
TypedDataInterface:: |
public | function | Sets the data value. | 1 |
TypedDataInterface:: |
public | function | Validates the currently set data value. | 1 |