';
if (method_exists($propertyGroup, 'getText')) {
$text = $propertyGroup->getText();
}
if ($text != null) {
$ret .= '
' . self::getString($text) . '
';
}
$ret .= '
';
}
}
if (! isset($properties)) {
$not_subgroup_header = true;
if (method_exists($propertyGroup, 'getProperties')) {
$properties = $propertyGroup->getProperties();
}
}
if (isset($properties)) {
/** @var OptionsPropertySubgroup $propertyItem */
foreach ($properties as $propertyItem) {
$property_class = get_class($propertyItem);
// if the property is a subgroup, we deal with it recursively
if (mb_strpos($property_class, "Subgroup")) {
// for subgroups
// each subgroup can have a header, which may also be a form element
/** @var OptionsPropertyItem $subgroup_header */
$subgroup_header = $propertyItem->getSubgroupHeader();
if (isset($subgroup_header)) {
$ret .= self::getOneOption(
$section,
$plugin_name,
$subgroup_header
);
}
$ret .= 'getName() . '">';
} else {
$ret .= '>';
}
$ret .= self::getOneOption(
$section,
$plugin_name,
$propertyItem,
true
);
continue;
}
// single property item
$ret .= self::getHtmlForProperty(
$section, $plugin_name, $propertyItem
);
}
}
if ($is_subgroup) {
// end subgroup
$ret .= '
';
} else {
// end main group
if (! empty($not_subgroup_header)) {
$ret .= '
';
}
}
if (method_exists($propertyGroup, "getDoc")) {
$doc = $propertyGroup->getDoc();
if ($doc != null) {
if (count($doc) == 3) {
$ret .= PhpMyAdmin\Util::showMySQLDocu(
$doc[1],
false,
$doc[2]
);
} elseif (count($doc) == 1) {
$ret .= PhpMyAdmin\Util::showDocu('faq', $doc[0]);
} else {
$ret .= PhpMyAdmin\Util::showMySQLDocu(
$doc[1]
);
}
}
}
// Close the list element after $doc link is displayed
if (isset($property_class)) {
if ($property_class == 'PhpMyAdmin\Properties\Options\Items\BoolPropertyItem'
|| $property_class == 'PhpMyAdmin\Properties\Options\Items\MessageOnlyPropertyItem'
|| $property_class == 'PhpMyAdmin\Properties\Options\Items\SelectPropertyItem'
|| $property_class == 'PhpMyAdmin\Properties\Options\Items\TextPropertyItem'
) {
$ret .= '';
}
}
$ret .= "\n";
return $ret;
}
/**
* Get HTML for properties items
*
* @param string $section name of config section in
* $GLOBALS['cfg'][$section] for plugin
* @param string $plugin_name unique plugin name
* @param OptionsPropertyItem $propertyItem Property item
*
* @return string
*/
public static function getHtmlForProperty(
$section, $plugin_name, $propertyItem
) {
$ret = null;
$property_class = get_class($propertyItem);
switch ($property_class) {
case 'PhpMyAdmin\Properties\Options\Items\BoolPropertyItem':
$ret .= '