Changeset 887 for trunk/Common/Form/Types/String.php
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Form/Types/String.php
r874 r887 5 5 class TypeString extends TypeBase 6 6 { 7 var $DatabaseCompareOperators = array('Jako' => 'LIKE', 'Rovno' => '=', 'Nerovno' => '!='); 7 function __construct(FormManager $FormManager) 8 { 9 parent::__construct($FormManager); 10 $this->DatabaseCompareOperators = array('Jako' => 'LIKE', 'Rovno' => '=', 'Nerovno' => '!='); 11 } 8 12 9 function OnView( $Item)13 function OnView(array $Item): ?string 10 14 { 11 15 $Output = $Item['Value']; … … 13 17 } 14 18 15 function OnEdit( $Item)19 function OnEdit(array $Item): string 16 20 { 17 21 $Output = '<input type="text" name="'.$Item['Name'].'" id="'.$Item['Name'].'" value="'.$Item['Value'].'"/>'; … … 19 23 } 20 24 21 function OnLoad( $Item)25 function OnLoad(array $Item): ?string 22 26 { 23 27 //echo($Item['Name'].'='.$_POST[$Item['Name']].','.is_null(NULL).'<br>'); … … 25 29 } 26 30 27 function DatabaseEscape( $Value)31 function DatabaseEscape(string $Value): string 28 32 { 29 33 return '"'.addslashes($Value).'"';
Note:
See TracChangeset
for help on using the changeset viewer.