interface YamlFormElementManagerInterface in YAML Form 8
Collects available form elements.
Hierarchy
- interface \Drupal\Component\Plugin\PluginManagerInterface; interface \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface; interface \Drupal\Component\Plugin\FallbackPluginManagerInterface; interface \Drupal\Component\Plugin\CategorizingPluginManagerInterface
- interface \Drupal\yamlform\YamlFormElementManagerInterface
Expanded class hierarchy of YamlFormElementManagerInterface
All classes that implement YamlFormElementManagerInterface
4 files declare their use of YamlFormElementManagerInterface
- YamlFormAdminSettingsForm.php in src/
Form/ YamlFormAdminSettingsForm.php - YamlFormPluginElementController.php in src/
Controller/ YamlFormPluginElementController.php - YamlFormUiElementFormBase.php in modules/
yamlform_ui/ src/ Form/ YamlFormUiElementFormBase.php - YamlFormUiElementTypeFormBase.php in modules/
yamlform_ui/ src/ Form/ YamlFormUiElementTypeFormBase.php
File
- src/
YamlFormElementManagerInterface.php, line 13
Namespace
Drupal\yamlformView source
interface YamlFormElementManagerInterface extends PluginManagerInterface, CachedDiscoveryInterface, FallbackPluginManagerInterface, CategorizingPluginManagerInterface {
/**
* Get all available form element plugin instances.
*
* @return \Drupal\yamlform\YamlFormElementInterface[]
* An array of all available form element plugin instances.
*/
public function getInstances();
/**
* Invoke a method for specific FAPI element.
*
* @param string $method
* The method name.
* @param array $element
* An associative array containing an element with a #type property.
* @param mixed $context1
* (optional) An additional variable that is passed by reference.
* @param mixed $context2
* (optional) An additional variable that is passed by reference. If more
* context needs to be provided to implementations, then this should be an
* associative array as described above.
*
* @return mixed|null
* Return result of the invoked method. NULL will be returned if the
* element and/or method name does not exist.
*/
public function invokeMethod($method, array &$element, &$context1 = NULL, &$context2 = NULL);
/**
* Is an element's plugin id.
*
* @param array $element
* A element.
*
* @return string
* An element's $type has a corresponding plugin id, else
* fallback 'element' plugin id.
*/
public function getElementPluginId(array $element);
/**
* Get a form element plugin instance for an element.
*
* @param array $element
* An associative array containing an element with a #type property.
*
* @return \Drupal\yamlform\YamlFormElementInterface
* A form element plugin instance
*/
public function getElementInstance(array $element);
/**
* Gets sorted plugin definitions.
*
* @param array[]|null $definitions
* (optional) The plugin definitions to sort. If omitted, all plugin
* definitions are used.
* @param string $sort_by
* The property to sort plugin definitions by. Only 'label' and 'category'
* are supported. Defaults to label.
*
* @return array[]
* An array of plugin definitions, sorted by category and label.
*/
public function getSortedDefinitions(array $definitions = NULL, $sort_by = 'label');
/**
* Get all translatable properties from all elements.
*
* @return array
* An array of translatable properties.
*/
public function getTranslatableProperties();
/**
* Get all properties for all elements.
*
* @return array
* An array of all properties.
*/
public function getAllProperties();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CachedDiscoveryInterface:: |
public | function | Clears static and persistent plugin definition caches. | 2 |
CachedDiscoveryInterface:: |
public | function | Disable the use of caches. | 2 |
CategorizingPluginManagerInterface:: |
public | function | Gets the names of all categories. | 1 |
CategorizingPluginManagerInterface:: |
public | function | Gets sorted plugin definitions grouped by category. | 1 |
DiscoveryInterface:: |
public | function | Gets a specific plugin definition. | 4 |
DiscoveryInterface:: |
public | function | Gets the definition of all plugins for this type. | 3 |
DiscoveryInterface:: |
public | function | Indicates if a specific plugin definition exists. | 2 |
FactoryInterface:: |
public | function | Creates a pre-configured instance of a plugin. | 7 |
FallbackPluginManagerInterface:: |
public | function | Gets a fallback id for a missing plugin. | 5 |
MapperInterface:: |
public | function | Gets a preconfigured instance of a plugin. | 4 |
YamlFormElementManagerInterface:: |
public | function | Get all properties for all elements. | 1 |
YamlFormElementManagerInterface:: |
public | function | Get a form element plugin instance for an element. | 1 |
YamlFormElementManagerInterface:: |
public | function | Is an element's plugin id. | 1 |
YamlFormElementManagerInterface:: |
public | function | Get all available form element plugin instances. | 1 |
YamlFormElementManagerInterface:: |
public | function |
Gets sorted plugin definitions. Overrides CategorizingPluginManagerInterface:: |
|
YamlFormElementManagerInterface:: |
public | function | Get all translatable properties from all elements. | 1 |
YamlFormElementManagerInterface:: |
public | function | Invoke a method for specific FAPI element. | 1 |