Commit 9482753c authored by Xano's avatar Xano Committed by bojanz
Browse files

Issue #2626746 by Xano: Expose the zone plugin type

parent 714ad0fc
address.zone_member:
label: Address zone member
plugin_manager_service_id: plugin.manager.address.zone_member
plugin_definition_decorator_class: \Drupal\address\PluginDefinition\ZoneMemberPluginDefinitionDecorator
plugin_configuration_schema_id: address.zone_member.[plugin_id]
......@@ -75,6 +75,9 @@ address.zone_member:
type: string
label: 'Plugin'
address.zone_member.*:
type: ignore
address.zone_member.country:
type: address.zone_member
label: 'Zone member (Country)'
......
<?php
/**
* @file
* Contains \Drupal\address\PluginDefinition\ZoneMemberPluginDefinitionDecorator.
*/
namespace Drupal\address\PluginDefinition;
use Drupal\plugin\PluginDefinition\ArrayPluginDefinitionDecorator;
/**
* Provides a zone member plugin definition decorator.
*/
class ZoneMemberPluginDefinitionDecorator extends ArrayPluginDefinitionDecorator {
/**
* {@inheritdoc}
*/
public function setLabel($label) {
$this->arrayDefinition['name'] = $label;
return $this;
}
/**
* {@inheritdoc}
*/
public function getLabel() {
return isset($this->arrayDefinition['name']) ? $this->arrayDefinition['name'] : NULL;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment