I guess the main points for review on this are:

Do we just pass the $data variable straight to the callback as this patch does now (and 7.x does)?

The default code to populate default values is new.

Comments

damiankloip’s picture

Title: Create method for DatabaseExportableController » create method for DatabaseExportableController
damiankloip’s picture

StatusFileSize
new810 bytes

Here is an updated version without the function callback calls.

tim.plunkett’s picture

Status: Needs review » Needs work
+++ b/lib/Drupal/ctools/DatabaseExportableController.phpundefined
@@ -310,7 +310,16 @@ class DatabaseExportableController extends ExportableControllerBase {
+  public function create(array $data = array()) {

That changes the function signature, so it should also be changed in ExportableControllerInterface.

Also, any thought to changing CToolsExportableTestCase::testExportable() to use create() now?

tim.plunkett’s picture

On second thought, replacing calls to new $this->info['exportable class'] can be a followup. But the interface definitely needs fixing.

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new1.23 KB

With the interface sig change

merlinofchaos’s picture

Status: Needs review » Fixed

This is easy enough to just push!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.