# tableberg/1.1.4/renderer/Attrs/SvgIconAttrs.php

Tableberg – Simple Gutenberg Table Block, version 1.1.4. 45 lines.

- Page: https://pluginprobe.com/plugins/tableberg/1.1.4/code/renderer/Attrs/SvgIconAttrs.php
- Raw: https://pluginprobe.com/plugins/tableberg/1.1.4/raw/renderer/Attrs/SvgIconAttrs.php
- Modified: 2026-05-04T16:51:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tableberg/1.1.4/code/renderer/Attrs/SvgIconAttrs.php#L10-L20`.

```php
<?php

namespace Tableberg\Renderer\Attrs;

use function Tableberg\Renderer\getOrNull;

class SvgIconAttrs {
    /** @var StringAttr */
    public $viewBox;

    /** @var StringAttr */
    public $path;

    /**
     * @param array<string, mixed>|null $data
     * @param array<string, mixed> $defaults
     * @param string $fallbackViewBox
     * @param string $fallbackPath
     * @return self
     */
    public static function from_array(
        $data,
        $defaults = [],
        $fallbackViewBox = '0 0 24 24',
        $fallbackPath = ''
    ) {
        $data = is_array($data) ? $data : [];

        $defaultViewBox = getOrNull($defaults['viewBox']);
        $defaultPath = getOrNull($defaults['path']);

        $instance = new self();
        $instance->viewBox = new StringAttr(
            getOrNull($data['viewBox']),
            $defaultViewBox
        );
        $instance->path = new StringAttr(
            getOrNull($data['path']),
            $defaultPath
        );

        return $instance;
    }
}

```
