Commit 8e086502 authored by catch's avatar catch

Issue #2112237 by vijaycs85, neclimdul, damiankloip: Fixed Regression: Remove...

Issue #2112237 by vijaycs85, neclimdul, damiankloip: Fixed Regression: Remove EntityFormControllerNG from book module.
parent 00780f28
......@@ -64,7 +64,7 @@ public function getBaseFormID() {
// twice otherwise.
$base_form_id = $this->entity->entityType() . '_form';
if ($base_form_id == $this->getFormId()) {
$base_form_id = '';
$base_form_id = NULL;
}
return $base_form_id;
}
......
......@@ -18,8 +18,8 @@ interface BaseFormIdInterface extends FormInterface {
/**
* Returns a string identifying the base form.
*
* @return string|false
* The string identifying the base form or FALSE if this is not a base form.
* @return string|null
* The string identifying the base form or NULL if this is not a base form.
*/
public function getBaseFormID();
......
......@@ -7,14 +7,14 @@
namespace Drupal\book\Form;
use Drupal\Core\Entity\EntityFormControllerNG;
use Drupal\Core\Entity\ContentEntityFormController;
use Drupal\book\BookManager;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Displays the book outline form.
*/
class BookOutlineForm extends EntityFormControllerNG {
class BookOutlineForm extends ContentEntityFormController {
/**
* The book being displayed.
......@@ -51,7 +51,7 @@ public static function create(ContainerInterface $container) {
* {@inheritdoc}
*/
public function getBaseFormID() {
return FALSE;
return NULL;
}
/**
......
......@@ -509,4 +509,17 @@ public function testBookOrdering() {
$this->assertFieldByName("table[book-admin-{$node2->id()}][weight]", 2);
$this->assertFieldByName("table[book-admin-{$node2->id()}][plid]", $plid);
}
/**
* Tests outline of a book.
*/
public function testBookOutline() {
// Create new book.
$this->drupalLogin($this->book_author);
$book = $this->createBookNode('new');
$this->drupalLogin($this->admin_user);
$this->drupalGet('node/' . $book->id() . '/outline');
$this->assertRaw(t('Book outline'));
}
}
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