Commit be6511d0 authored by jrockowitz's avatar jrockowitz

Code review.

parent 8440c048
......@@ -21,5 +21,5 @@ interface BlockFieldItemInterface extends FieldItemInterface {
* Return the block instance or NULL if the block does not exist.
*/
public function getBlock();
}
......@@ -19,5 +19,5 @@ interface BlockFieldManagerInterface {
* An associative array of supported block definitions.
*/
public function getBlockDefinitions();
}
......@@ -41,9 +41,6 @@ class BlockFieldWidget extends WidgetBase {
* {@inheritdoc}
*/
public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
/** @var \Drupal\Core\Block\BlockManagerInterface $block_manager */
$block_manager = \Drupal::service('plugin.manager.block');
/** @var \Drupal\block_field\BlockFieldItemInterface $item */
$item =& $items[$delta];
......
<?php
/**
* @file
* Contains \Drupal\block_field\Tests\BlockFieldTest.
*/
namespace Drupal\block_field\Tests;
use Drupal\simpletest\WebTestBase;
......@@ -21,7 +26,7 @@ class BlockFieldTest extends WebTestBase {
/**
* Tests block field.
*/
function testBlockField() {
public function testBlockField() {
$admin_user = $this->drupalCreateUser([
'access content',
'administer nodes',
......
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