Skip to content
Snippets Groups Projects

Port the Markup element to GraphQL 4.

9 files
+ 87
69
Compare changes
  • Side-by-side
  • Inline
Files
9
+ 33
0
<?php
declare(strict_types=1);
namespace Drupal\graphql_webform\Enum;
/**
* Enumerates the possible display targets for webform elements.
*
* @see \Drupal\webform\Plugin\WebformElementDisplayOnInterface
*/
enum WebformElementDisplayOn: string {
case DISPLAY_ON_BOTH = 'both';
case DISPLAY_ON_FORM = 'form';
case DISPLAY_ON_VIEW = 'view';
case DISPLAY_ON_NONE = 'none';
/**
* Returns the enum values as an associative array.
*
* @return array<string, string>
* The enum values as an associative array.
*/
public static function toArray(): array {
$cases = [];
foreach (self::cases() as $case) {
$cases[$case->name] = $case->value;
}
return $cases;
}
}
Loading