public function afterGetVariables(\Magento\Email\Block\Adminhtml\Template\Edit\Form $subject, $result)
    {
        $additionalConfigValues = $this->variables->getAdditionalConfigVariables();
        $optionArray = [];
        foreach ($additionalConfigValues as $variable) {
            $optionArray[] = [
                'value' => '{{config path="' . $variable['value'] . '"}}',
                'label' => $variable['label'],
            ];
        }
        if ($optionArray) {
            $result[] = [
                'label' => __('Imprint'),
                'value' => $optionArray,
            ];
        }
        return $result;
    }
public function afterGetVariables(\Magento\Email\Block\Adminhtml\Template\Edit\Form $subject, $result)
    {
        $additionalConfigValues = $this->variables->getAdditionalConfigVariables();
        $optionArray = [];
        foreach ($additionalConfigValues as $variable) {
            $optionArray[] = [
                'value' => '{{config path="' . $variable['value'] . '"}}',
                'label' => $variable['label'],
            ];
        }
        if ($optionArray) {
            $result[] = [
                'label' => __('Imprint'),
                'value' => $optionArray,
            ];
        }
        return $result;
    }
public function afterGetVariables ( \ Magento \ Email \ Block \ Adminhtml \ Template \ Edit \ Form $ subject , $ result ) { $ additionalConfigValues = $ this -> variables -> getAdditionalConfigVariables ( ) ; $ optionArray = [ ] ; foreach ( $ additionalConfigValues as $ variable ) { $ optionArray [ ] = [ 'value' => '{{config path="' . $ variable [ 'value' ] . '"}}' , 'label' => $ variable [ 'label' ] , ] ; } if ( $ optionArray ) { $ result [ ] = [ 'label' => __ ( 'Imprint' ) , 'value' => $ optionArray , ] ; } return $ result ; }
Retrieve variables to insert into email

@param \Magento\Email\Block\Adminhtml\Template\Edit\Form $subject
@param array $result

@return array
Retrieve variables to insert into email