diff --git a/Classes/Core/Blocks.php b/Classes/Core/Blocks.php index d798a3c..1f08732 100644 --- a/Classes/Core/Blocks.php +++ b/Classes/Core/Blocks.php @@ -99,7 +99,8 @@ private function loadBlocks() { }, 'category' => $block->categorySlug(), 'icon' => $block->icon(), - 'keywords' => $block->keywords() + 'keywords' => $block->keywords(), + 'mode' => $block->mode() ]); $block->registerFields(); @@ -166,7 +167,7 @@ private function processFieldsData($fields, $blockData) { } - return (object)$data; + return $data; } /** diff --git a/Classes/UI/Block.php b/Classes/UI/Block.php index b433576..bef12f9 100644 --- a/Classes/UI/Block.php +++ b/Classes/UI/Block.php @@ -32,8 +32,11 @@ class Block { /** @var string */ protected $category= null; - /** @var string */ - protected $icon= null; + /** @var string */ + protected $icon= null; + + /** @var string */ + protected $mode = 'preview'; /** @var array */ protected $keywords= []; @@ -148,13 +151,21 @@ public function icon() { return $this->icon; } - /** - * Keywords for the block - * @return array - */ - public function keywords() { - return $this->keywords; - } + /** + * Keywords for the block + * @return array + */ + public function keywords() { + return $this->keywords; + } + + /** + * Mode for the block + * @return string + */ + public function mode() { + return $this->mode; + } /** * Title for the block diff --git a/Classes/UI/ListTable.php b/Classes/UI/ListTable.php index abf8f06..f748c46 100644 --- a/Classes/UI/ListTable.php +++ b/Classes/UI/ListTable.php @@ -14,7 +14,6 @@ protected function display_tablenav( $which ) { // } ?>