Skip to content
Snippets Groups Projects
Select Git revision
  • 7fe372c75a04a1e0785b1f33bd225a8144b8a88d
  • 2.0.x default
  • 8.x-1.x
  • 3519543-bug--sample-entity
  • 2.0.6
  • 2.0.5
  • 8.x-1.13
  • 8.x-1.12
  • 8.x-1.11
  • previous/3525646-2.1.0-copy-variant/2025-05-27
  • previous/3525775-computed-entity-ref/2025-05-27
  • 2.0.4
  • previous/3525646-2.1.0-copy-variant/2025-05-21
  • previous/3525646-2.1.0-copy-variant/2025-05-20
  • 2.0.3
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 2.0.0-rc2
  • 2.0.0-rc1
  • 2.0.0-beta6
  • 2.0.0-beta5
  • 2.0.0-beta4
  • 8.x-1.10
24 results

PropTypeInterface.php

Blame
  • Mikael Meulle's avatar
    Issue #3464289 by just_like_good_vibes: [2.0.0-beta1] Code quality: Plugin management
    Mikael Meulle authored
    98ff2785
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    PropTypeInterface.php 1.04 KiB
    <?php
    
    namespace Drupal\ui_patterns;
    
    use Drupal\Component\Plugin\PluginInspectionInterface;
    
    /**
     * Interface for prop_type plugins.
     */
    interface PropTypeInterface extends WithJsonSchemaInterface, PluginInspectionInterface {
    
      /**
       * Returns the translated plugin label.
       *
       * @return string
       *   The translated title.
       */
      public function label();
    
      /**
       * Convert value from an other type.
       *
       * @return mixed
       *   Converted value.
       *
       * @throws \UnhandledMatchError
       */
      public static function convertFrom(string $prop_type, mixed $value): mixed;
    
      /**
       * Get default source ID.
       *
       * @return string
       *   Source ID.
       */
      public function getDefaultSourceId(): string;
    
      /**
       * Returns a short summary for the current prop.
       *
       * @return array
       *   A short summary of the prop.
       */
      public function getSummary(array $definition): array;
    
      /**
       * Normalize the prop type value.
       *
       * @return mixed
       *   The normalized prop type value.
       */
      public static function normalize(mixed $value): mixed;
    
    }