ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilWebLinkDraftParameter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
30 public const string LINKS_ERR_NO_NAME = 'links_no_name_given';
31 public const string LINKS_ERR_NO_VALUE = 'links_no_value_given';
32 public const string LINKS_ERR_NO_NAME_VALUE = 'links_no_name_no_value';
33
34
36
38 {
39 $this->old_parameter = $old_parameter;
40 return $this;
41 }
42
44 {
46 }
47
52 public function validate(): string
53 {
54 if (!strlen($this->getName()) && !$this->getValue()) {
56 }
57 if (!strlen($this->getName())) {
59 }
60 if (!$this->getValue()) {
62 }
63 return '';
64 }
65}
Base class for parameters attached to Web Link items.
Draft class for creating and updating a parameter attached to Web Link items.
const string LINKS_ERR_NO_NAME
TODO: This can be removed when validate is.
replaces(?ilWebLinkParameter $old_parameter)
validate()
TODO: Modernizing the forms to input parameters will make this additional layer of input validation o...
Immutable class for parameters attached to Web Link items.