1<?php
2
3namespace dokuwiki\plugin\struct\types;
4
5/**
6 * Class AbstractBaseType
7 *
8 * This class implements a standard multi editor that can be reused by user types. The multi-
9 * edit simply joins all values with commas
10 *
11 * @package dokuwiki\plugin\struct\types
12 * @see Column
13 */
14abstract class AbstractMultiBaseType extends AbstractBaseType
15{
16    /**
17     * @param string $name
18     * @param \string[] $rawvalues
19     * @param string $htmlID a unique id to be referenced by the label
20     *
21     * @return string
22     */
23    public function multiValueEditor($name, $rawvalues, $htmlID)
24    {
25        $value = implode(', ', $rawvalues);
26
27        return
28            '<div class="multiwrap">' .
29            $this->valueEditor($name, $value, $htmlID) .
30            '</div>' .
31            '<small>' .
32            $this->getLang('multi') .
33            '</small>';
34    }
35}
36