Commit 1de26796 authored by jrockowitz's avatar jrockowitz

Code review and cleanup.

parent 979d9b6b
<?php
/**
* @file
* Contains \Drupal\block_field\BlockFieldItemInterface.
*/
namespace Drupal\block_field;
use Drupal\Core\Field\FieldItemInterface;
......
<?php
/**
* @file
* Contains \Drupal\block_field\Plugin\Field\FieldFormatter\BlockFieldFormatter.
*/
namespace Drupal\block_field\Plugin\Field\FieldFormatter;
use Drupal\Core\Field\FieldItemListInterface;
......
<?php
/**
* @file
* Contains \Drupal\block_field\Plugin\Field\FieldType\BlockFieldItem.
*/
namespace Drupal\block_field\Plugin\Field\FieldType;
use Drupal\block\BlockInterface;
use Drupal\block_field\BlockFieldItemInterface;
use Drupal\Core\Field\FieldItemBase;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
......@@ -88,7 +92,7 @@ class BlockFieldItem extends FieldItemBase implements BlockFieldItemInterface {
foreach ($definitions as $id => $definition) {
$options[$id] = [
['category' => (string) $definition['category']],
['label' => $definition['admin_label'] . ' (' . $id . ')'],
['label' => $definition['admin_label'] . ' (' . $id . ')'],
['provider' => $definition['provider']],
];
}
......
<?php
/**
* @file
* Contains \Drupal\block_field\Plugin\Field\FieldWidget\BlockFieldWidget.
*/
namespace Drupal\block_field\Plugin\Field\FieldWidget;
use Drupal\block\BlockInterface;
......
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