Add helpid

This commit is contained in:
Thomas Peterson 2025-05-28 20:25:15 +00:00
parent 22fc619cf5
commit b45514ee18
5 changed files with 18 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -34,6 +34,9 @@ class Base
if(isset($this->node['helplink'])) { if(isset($this->node['helplink'])) {
$this->element->setHelpLink((string)$this->node['helplink']); $this->element->setHelpLink((string)$this->node['helplink']);
} }
if(isset($this->node['helpid'])) {
$this->element->setHelpId((string)$this->node['helpid']);
}
if(isset($this->node['exportAjax']) && (string)$this->node['exportAjax'] == 1) { if(isset($this->node['exportAjax']) && (string)$this->node['exportAjax'] == 1) {
$this->element->setIsAjaxExport(true); $this->element->setIsAjaxExport(true);
} }

View File

@ -21,6 +21,8 @@ class Base
protected ?string $helpLink = null; protected ?string $helpLink = null;
protected ?string $helpId = null;
/** @var boolean $require */ /** @var boolean $require */
protected $require = false; protected $require = false;
@ -168,6 +170,16 @@ class Base
$this->help = $help; $this->help = $help;
} }
public function setHelpId(string $var): void
{
$this->helpId = $var;
}
public function getHelpId(): ?string
{
return $this->helpId;
}
public function setHelpLink(string $var): void public function setHelpLink(string $var): void
{ {
$this->helpLink = $var; $this->helpLink = $var;

View File

@ -52,6 +52,7 @@ class CalcTest extends TestCase
$article = $this->engine->getArticle(); $article = $this->engine->getArticle();
$this->assertSame("Hello World", $article->getOptionById('breite_frei')->getHelp()); $this->assertSame("Hello World", $article->getOptionById('breite_frei')->getHelp());
$this->assertSame("cms/test", $article->getOptionById('breite_frei')->getHelpLink()); $this->assertSame("cms/test", $article->getOptionById('breite_frei')->getHelpLink());
$this->assertSame("breite_frei_id", $article->getOptionById('breite_frei')->getHelpId());
} }
public function testMaxBreite(): void public function testMaxBreite(): void

View File

@ -52,7 +52,7 @@
<opt id="9" name="Freies Format"></opt> <opt id="9" name="Freies Format"></opt>
</option> </option>
<option id="breite_frei" name="Breite (in mm)" type="Input" default="100" min="30" max="480" help="Hello World" helplink="cms/test"> <option id="breite_frei" name="Breite (in mm)" type="Input" default="100" min="30" max="480" help="Hello World" helplink="cms/test" helpid="breite_frei_id">
<format1> <format1>
<grenze>9</grenze> <grenze>9</grenze>
</format1> </format1>