mirror of
https://github.com/cosmocode/dokuwiki-plugin-struct.git
synced 2025-07-25 16:01:54 +00:00
36 lines
869 B
PHP
36 lines
869 B
PHP
<?php
|
|
|
|
namespace dokuwiki\plugin\struct\types;
|
|
|
|
/**
|
|
* Class AbstractBaseType
|
|
*
|
|
* This class implements a standard multi editor that can be reused by user types. The multi-
|
|
* edit simply joins all values with commas
|
|
*
|
|
* @package dokuwiki\plugin\struct\types
|
|
* @see Column
|
|
*/
|
|
abstract class AbstractMultiBaseType extends AbstractBaseType
|
|
{
|
|
/**
|
|
* @param string $name
|
|
* @param \string[] $rawvalues
|
|
* @param string $htmlID a unique id to be referenced by the label
|
|
*
|
|
* @return string
|
|
*/
|
|
public function multiValueEditor($name, $rawvalues, $htmlID)
|
|
{
|
|
$value = implode(', ', $rawvalues);
|
|
|
|
return
|
|
'<div class="multiwrap">' .
|
|
$this->valueEditor($name, $value, $htmlID) .
|
|
'</div>' .
|
|
'<small>' .
|
|
$this->getLang('multi') .
|
|
'</small>';
|
|
}
|
|
}
|