You are here

class ColorRGBA in Open Social 10.3.x

Same name and namespace in other branches
  1. 10.2.x modules/social_features/social_branding/src/Plugin/GraphQL/DataProducer/ColorRGBA.php \Drupal\social_branding\Plugin\GraphQL\DataProducer\ColorRGBA

The RGBA color.

Plugin annotation


@DataProducer(
  id = "color_rgba",
  name = @Translation("Color"),
  description = @Translation("The color."),
  produces = @ContextDefinition("any",
    label = @Translation("Color")
  ),
  consumes = {
    "color" = @ContextDefinition("any",
      label = @Translation("Color"),
      required = TRUE
    )
  }
)

Hierarchy

  • class \Drupal\social_branding\Plugin\GraphQL\DataProducer\ColorRGBA extends \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Entity\EntityDataProducerPluginBase

Expanded class hierarchy of ColorRGBA

File

modules/social_features/social_branding/src/Plugin/GraphQL/DataProducer/ColorRGBA.php, line 26

Namespace

Drupal\social_branding\Plugin\GraphQL\DataProducer
View source
class ColorRGBA extends EntityDataProducerPluginBase {

  /**
   * Returns the RGBA color.
   *
   * @param \Drupal\social_branding\Wrappers\Color $color
   *   The branding color.
   *
   * @return \Drupal\social_branding\Wrappers\Color
   *   The branding color.
   */
  public function resolve(Color $color) : Color {
    return $color;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ColorRGBA::resolve public function Returns the RGBA color.