Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separator #105

Open
sahar-08 opened this issue Jun 4, 2022 · 0 comments
Open

separator #105

sahar-08 opened this issue Jun 4, 2022 · 0 comments

Comments

@sahar-08
Copy link

sahar-08 commented Jun 4, 2022

private function renderFieldsList($templates, $template, $config, $values, $set = '')
{
$out = '';
$data = [];

    if (isset($config['fields'])) {
        foreach ($config['fields'] as $field => $options) {
            if (isset($options['elements'])) {
                if (!isset($templates[$field])) {
                    $data[$field] = $values[$field];

                    if (is_array($data[$field])) {
                        $data[$field] = implode($options['separator'], $data[$field]);
                    }
                } else {
                    $fieldTemplates = $templates[$field];

                    if (!is_array($fieldTemplates)) {
                        $fieldTemplates = [ $fieldTemplates ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant