src/PeskyCMF/Scaffold/Form/WysiwygFormInput.php
static public function createDataInsertConfig($phpCode, $title, $showAsBlock = false) {
        if (!is_string($phpCode) || empty(trim($phpCode))) {
            throw new \InvalidArgumentException('$phpCode argument must be a not empty string');
        }
        if (!is_string($title) || empty(trim($title))) {
            throw new \InvalidArgumentException('$title argument must be a not empty string');
        }
        return [
            'code' => $phpCode,
            'title' => $title,
            'is_block' => (bool)$showAsBlock
        ];
    }
static public function createDataInsertConfig($phpCode, $title, $showAsBlock = false) {
        if (!is_string($phpCode) || empty(trim($phpCode))) {
            throw new \InvalidArgumentException('$phpCode argument must be a not empty string');
        }
        if (!is_string($title) || empty(trim($title))) {
            throw new \InvalidArgumentException('$title argument must be a not empty string');
        }
        return [
            'code' => $phpCode,
            'title' => $title,
            'is_block' => (bool)$showAsBlock
        ];
    }
Create valid single item config for wysiwyg's data inserter plugin
@param string $phpCode - php code that returns some text content. Code is inserted using Blade's command '{!! your_code_here !!}'
@param string $title - insert's label to display inside wysiwyg editor
@param bool $showAsBlock -
- true: inserted data is separate block (<div>, <p> or some other block element);
- false (default): inserted data is inline (simple text, <span>, etc)
@return array
@throws \InvalidArgumentException