# jc-importer/trunk/class/Common/AddonAPI/Importer/Template/Panel.php

Import WP – CSV &amp; XML Import Export for WordPress, version trunk. 49 lines.

- Page: https://pluginprobe.com/plugins/jc-importer/trunk/code/class/Common/AddonAPI/Importer/Template/Panel.php
- Raw: https://pluginprobe.com/plugins/jc-importer/trunk/raw/class/Common/AddonAPI/Importer/Template/Panel.php
- Modified: 2024-07-14T15:13:26+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/jc-importer/trunk/code/class/Common/AddonAPI/Importer/Template/Panel.php#L10-L20`.

```php
<?php

namespace ImportWP\Common\AddonAPI\Importer\Template;

class Panel extends Group
{
    private $_id;
    private $_name;
    private $_repeater = false;

    public function __construct($name, $args = [])
    {
        $this->_id = $args['id'] ?? sanitize_title($name);
        $this->_name = $name;
    }

    public function get_id()
    {
        return $this->_id;
    }

    public function get_name()
    {
        return $this->_name;
    }

    public function get_args()
    {
        $args = [];

        if ($this->is_repeater()) {
            $args['type'] = 'repeatable';
        }

        return $args;
    }

    public function repeater($bool = true)
    {
        $this->_repeater = $bool;
        return $this;
    }

    public function is_repeater()
    {
        return $this->_repeater;
    }
}

```
