Commit b2f4f0fa authored by pcambra's avatar pcambra Committed by bojanz
Browse files

Issue #2575491 by pcambra: Move entity and zone member interfaces

parent 5fbaa50d
......@@ -7,7 +7,6 @@
namespace Drupal\address\Entity;
use Drupal\address\AddressFormatInterface;
use CommerceGuys\Addressing\Enum\AddressField;
use CommerceGuys\Addressing\Enum\AdministrativeAreaType;
use CommerceGuys\Addressing\Enum\DependentLocalityType;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\address\AddressFormatInterface.
* Contains \Drupal\address\Entity\AddressFormatInterface.
*/
namespace Drupal\address;
namespace Drupal\address\Entity;
use CommerceGuys\Addressing\Model\AddressFormatEntityInterface as ExternalAddressFormatInterface;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
......
......@@ -6,8 +6,7 @@
namespace Drupal\address\Entity;
use Drupal\address\ZoneInterface;
use Drupal\address\ZoneMemberInterface;
use Drupal\address\Plugin\ZoneMember\ZoneMemberInterface;
use Drupal\address\ZoneMemberPluginCollection;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use CommerceGuys\Addressing\Model\AddressInterface;
......
......@@ -2,11 +2,12 @@
/**
* @file
* Contains \Drupal\address\ZoneInterface.
* Contains \Drupal\address\Entity\ZoneInterface.
*/
namespace Drupal\address;
namespace Drupal\address\Entity;
use Drupal\address\Plugin\ZoneMember\ZoneMemberInterface;
use CommerceGuys\Zone\Model\ZoneInterface as ExternalZoneInterface;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
......
......@@ -12,7 +12,7 @@ use CommerceGuys\Addressing\Enum\AdministrativeAreaType;
use CommerceGuys\Addressing\Enum\DependentLocalityType;
use CommerceGuys\Addressing\Enum\LocalityType;
use CommerceGuys\Addressing\Enum\PostalCodeType;
use Drupal\address\AddressFormatInterface;
use Drupal\address\Entity\AddressFormatInterface;
/**
* Provides translated labels for the library enums.
......@@ -26,7 +26,7 @@ class LabelHelper {
* term than the field name (Company instead of Organization, Contact name
* instead of Recipient, etc).
*
* @param \Drupal\address\AddressFormatInterface $addressFormat
* @param \Drupal\address\Entity\AddressFormatInterface $addressFormat
* The address format.
*
* @return string[]
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\address\ZoneMemberBase.
* Contains \Drupal\address\Plugin\ZoneMember\ZoneMemberBase.
*/
namespace Drupal\address;
namespace Drupal\address\Plugin\ZoneMember;
use CommerceGuys\Addressing\Model\AddressInterface;
use Drupal\Core\Form\FormStateInterface;
......@@ -20,7 +20,7 @@ abstract class ZoneMemberBase extends PluginBase implements ZoneMemberInterface
/**
* The parent zone.
*
* @var \Drupal\address\ZoneInterface
* @var \Drupal\address\Entity\ZoneInterface
*/
protected $parentZone;
......
......@@ -8,7 +8,6 @@
namespace Drupal\address\Plugin\ZoneMember;
use CommerceGuys\Addressing\Model\AddressInterface;
use Drupal\address\ZoneMemberBase;
/**
* Matches EU addresses.
......
......@@ -2,17 +2,17 @@
/**
* @file
* Contains \Drupal\address\ZoneMemberInterface.
* Contains \Drupal\address\Plugin\ZoneMember\ZoneMemberInterface.
*/
namespace Drupal\address;
namespace Drupal\address\Plugin\ZoneMember;
use CommerceGuys\Zone\Model\ZoneMemberInterface as ExternalZoneMemberInterface;
use Drupal\Core\Plugin\PluginFormInterface;
use Drupal\Component\Plugin\ConfigurablePluginInterface;
/**
* Defines the interface for zone memberss.
* Defines the interface for zone members.
*/
interface ZoneMemberInterface extends ExternalZoneMemberInterface, ConfigurablePluginInterface, PluginFormInterface {
}
......@@ -8,7 +8,6 @@
namespace Drupal\address\Plugin\ZoneMember;
use CommerceGuys\Addressing\Model\AddressInterface;
use Drupal\address\ZoneMemberBase;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
......
......@@ -7,11 +7,12 @@
namespace Drupal\address;
use Drupal\address\Entity\ZoneInterface;
use Drupal\Component\Uuid\UuidInterface;
use Drupal\Component\Plugin\Factory\DefaultFactory;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Component\Uuid\UuidInterface;
use Drupal\Component\Plugin\Factory\DefaultFactory;
/**
* Manages zone member plugins.
......
......@@ -7,6 +7,7 @@
namespace Drupal\address;
use Drupal\address\Entity\ZoneInterface;
use Drupal\Component\Plugin\Exception\PluginNotFoundException;
use Drupal\Core\Plugin\DefaultLazyPluginCollection;
use Drupal\Component\Plugin\PluginManagerInterface;
......@@ -24,14 +25,14 @@ class ZoneMemberPluginCollection extends DefaultLazyPluginCollection {
/**
* The parent zone.
*
* @var \Drupal\address\ZoneInterface
* @var \Drupal\address\Entity\ZoneInterface
*/
protected $parentZone;
/**
* {@inheritdoc}
*
* @param \Drupal\address\ZoneInterface $parentZone
* @param \Drupal\address\Entity\ZoneInterface $parentZone
* The parent zone.
*/
public function __construct(PluginManagerInterface $manager, array $configurations, ZoneInterface $parentZone) {
......
Supports Markdown
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