diff --git a/lib/Drupal/ctools/PhpExporter.php b/lib/Drupal/ctools/PhpExporter.php index afdae5c..8cf2093 100644 --- a/lib/Drupal/ctools/PhpExporter.php +++ b/lib/Drupal/ctools/PhpExporter.php @@ -7,6 +7,9 @@ namespace Drupal\ctools; +/** + * Defines a ctools exporter which uses PHP to dump the config. + */ class PhpExporter implements ExporterInterface { /** @@ -24,7 +27,7 @@ class PhpExporter implements ExporterInterface { * Implements ExporterInterface::export(). */ public function export($data) { - ctools_include('export'); - return ctools_var_export($data); + include_once DRUPAL_ROOT . '/core/includes/utility.inc'; + return drupal_var_export($data); } } diff --git a/lib/Drupal/ctools/Tests/PhpExporterTest.php b/lib/Drupal/ctools/Tests/PhpExporterTest.php index b1fb507..b546899 100644 --- a/lib/Drupal/ctools/Tests/PhpExporterTest.php +++ b/lib/Drupal/ctools/Tests/PhpExporterTest.php @@ -51,8 +51,8 @@ class PhpExporterTest extends ExporterBaseTest { $data['multi-level-array']['string'] = "array( 'foo' => 'bar', 'beatles' => array( - 0 => 'Ringo', - 1 => 'Paul', + 'Ringo', + 'Paul', ), 'beatles_complex' => array( 'John' => array(