class ColorBlue in Open Social 10.2.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_branding/src/Plugin/GraphQL/DataProducer/ColorBlue.php \Drupal\social_branding\Plugin\GraphQL\DataProducer\ColorBlue
The blue component from color.
Plugin annotation
@DataProducer(
id = "color_blue",
name = @Translation("Color blue component"),
description = @Translation("The color blue component."),
produces = @ContextDefinition("int",
label = @Translation("Color blue component")
),
consumes = {
"color" = @ContextDefinition("any",
label = @Translation("Color"),
required = TRUE
)
}
)
Hierarchy
- class \Drupal\social_branding\Plugin\GraphQL\DataProducer\ColorBlue extends \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Entity\EntityDataProducerPluginBase
Expanded class hierarchy of ColorBlue
File
- modules/
social_features/ social_branding/ src/ Plugin/ GraphQL/ DataProducer/ ColorBlue.php, line 26
Namespace
Drupal\social_branding\Plugin\GraphQL\DataProducerView source
class ColorBlue extends EntityDataProducerPluginBase {
/**
* Returns the color blue component.
*
* @param \Drupal\social_branding\Wrappers\Color $color
* The color.
*
* @return int
* The color blue component.
*/
public function resolve(Color $color) : int {
return $color
->blue();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ColorBlue:: |
public | function | Returns the color blue component. |