src/Font/Font.php
protected function getVars($content, $details = [])
    {
        // Build defaults
        $defaults = [
            'id' => '',
            'title' => Translate::t('font.title', [], 'fontfield'),
            'default' => '',
            'description' => '',
            'fonts' => false,
            'api_key' => '',

            // options
            'styles' => '',
            'css' => '',

            // texts
            't_populars' => Translate::t('font.populars', [], 'fontfield'),
            't_others' => Translate::t('font.others', [], 'fontfield'),
        ];

        // Build defaults data
        $vars = array_merge($defaults, $content);

        // Retirve all fonts
        $vars['options'] = $this->getFontGoogle($vars['api_key']);

        // Retrieve field value
        $vars['val'] = $this->getValue($content['id'], $details, $vars['default']);

        // Update vars
        $this->getModel()->setVars($vars);
    }
protected function getVars($content, $details = [])
    {
        // Build defaults
        $defaults = [
            'id' => '',
            'title' => Translate::t('font.title', [], 'fontfield'),
            'default' => '',
            'description' => '',
            'fonts' => false,
            'api_key' => '',

            // options
            'styles' => '',
            'css' => '',

            // texts
            't_populars' => Translate::t('font.populars', [], 'fontfield'),
            't_others' => Translate::t('font.others', [], 'fontfield'),
        ];

        // Build defaults data
        $vars = array_merge($defaults, $content);

        // Retirve all fonts
        $vars['options'] = $this->getFontGoogle($vars['api_key']);

        // Retrieve field value
        $vars['val'] = $this->getValue($content['id'], $details, $vars['default']);

        // Update vars
        $this->getModel()->setVars($vars);
    }
Prepare HTML component.

@param array $content
@param array $details