Select Git revision
PropTypeInterface.php

#3464289 by just_like_good_vibes: [2.0.0-beta1] Code quality: Plugin management
Mikael Meulle authored
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;
}