Commit 5bcf7338 authored by webchick's avatar webchick

Issue #2058257 by effulgentsia: Fix ConfigFieldItemInterface's method...

Issue #2058257 by effulgentsia: Fix ConfigFieldItemInterface's method signatures to typehint interfaces instead of classes.
parent 10f684b9
......@@ -11,7 +11,7 @@
use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Entity\Field\PrepareCacheInterface;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
use Drupal\field\Plugin\Type\FieldType\ConfigFieldItemBase;
/**
......@@ -57,7 +57,7 @@ public function getPropertyDefinitions() {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
......@@ -10,7 +10,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Entity\Plugin\DataType\EmailItem;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation of the 'email' field type.
......@@ -40,7 +40,7 @@ class ConfigurableEmailItem extends EmailItem {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\Plugin\DataType\EntityReferenceItem;
use Drupal\field\Plugin\Type\FieldType\ConfigFieldItemInterface;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* A common base class for configurable entity reference fields.
......@@ -93,7 +93,7 @@ public function getPropertyDefinitions() {
* Copied from \Drupal\field\Plugin\field\field_type\LegacyConfigFieldItem,
* since we cannot extend it.
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
$definition = \Drupal::service('plugin.manager.entity.field.field_type')->getDefinition($field->type);
$module = $definition['provider'];
module_load_install($module);
......
......@@ -8,7 +8,7 @@
namespace Drupal\field\Plugin\Type\FieldType;
use Drupal\Core\Entity\Field\FieldItemInterface;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Interface definition for 'configurable field type' plugins.
......@@ -18,7 +18,7 @@ interface ConfigFieldItemInterface extends FieldItemInterface {
/**
* Returns the field instance definition.
*
* @var \Drupal\field\Plugin\Core\Entity\FieldInstance
* @var \Drupal\field\FieldInstanceInterface
*/
public function getInstance();
......@@ -29,7 +29,7 @@ public function getInstance();
* creation of the field. No field instances exist by then, and it is not
* possible to instantiate a FieldItemInterface object yet.
*
* @param \Drupal\field\Plugin\Core\Entity\Field $field
* @param \Drupal\field\FieldInterface $field
* The field definition.
*
* @return array
......@@ -54,7 +54,7 @@ public function getInstance();
* specify another field as related, only existing SQL tables,
* such as {taxonomy_term_data}.
*/
public static function schema(Field $field);
public static function schema(FieldInterface $field);
/**
* Returns a form for the field-level settings.
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\Field\PrepareCacheInterface;
use Drupal\field\Plugin\Type\FieldType\ConfigFieldItemBase;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation for legacy field types.
......@@ -29,7 +29,7 @@ abstract class LegacyConfigFieldItem extends ConfigFieldItemBase implements Prep
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
$definition = \Drupal::service('plugin.manager.entity.field.field_type')->getDefinition($field->type);
$module = $definition['provider'];
module_load_install($module);
......
......@@ -10,7 +10,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\FieldType\ConfigFieldItemBase;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation of the 'link' field type.
......@@ -59,7 +59,7 @@ public function getPropertyDefinitions() {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'url' => array(
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
use Drupal\Component\Utility\MapArray;
/**
......@@ -51,7 +51,7 @@ public function getPropertyDefinitions() {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation of the 'number_float' field type.
......@@ -46,7 +46,7 @@ public function getPropertyDefinitions() {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation of the 'number_integer' field type.
......@@ -46,7 +46,7 @@ public function getPropertyDefinitions() {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
......@@ -10,7 +10,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\FieldType\ConfigFieldItemBase;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation of the 'telephone' field type.
......@@ -35,7 +35,7 @@ class TelephoneItem extends ConfigFieldItemBase {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation of the 'text' field type.
......@@ -33,7 +33,7 @@ class TextItem extends TextItemBase {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation of the 'text_long' field type.
......@@ -30,7 +30,7 @@ class TextLongItem extends TextItemBase {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\Annotation\FieldType;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Core\Entity\Field;
use Drupal\field\FieldInterface;
/**
* Plugin implementation of the 'text_with_summary' field type.
......@@ -63,7 +63,7 @@ public function getPropertyDefinitions() {
/**
* {@inheritdoc}
*/
public static function schema(Field $field) {
public static function schema(FieldInterface $field) {
return array(
'columns' => array(
'value' => array(
......
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