Running Task MigrateContentToElement

GET /dev/tasks/DNADesign-Elemental-Tasks-MigrateContentToElement

[Emergency] Uncaught Error: Call to undefined method DNADesign\Elemental\Models\ElementalArea::elemental_page_types()

GET /dev/tasks/DNADesign-Elemental-Tasks-MigrateContentToElement

Line 20 in /srv/users/serverpilot/apps/pagebuildr/public/vendor/dnadesign/silverstripe-elemental/src/Tasks/MigrateContentToElement.php

Source

11 {
12 
13     protected $title = 'MigrateContentToElement';
14 
15     protected $description = 'When installing Elemental this task converts content in the $Content field to an ElementContent';
16 
17     public function run($request)
18     {
19         // TODO: needs rewriting for multiple elemental areas
20         $pageTypes = ElementalArea::elemental_page_types();
21         $count = 0;
22         foreach ($pageTypes as $pageType) {
23             $pages = $pageType::get()->filter('ElementalAreaID', 0);
24             foreach ($pages as $page) {
25                 $content = $page->Content;
26                 $page->Content = '';

Trace