Record::setGetModeHTML - jcobban/Genealogy GitHub Wiki

$record->setGetModeHTML($newval)

Up: class LegacyDate

This method alters the behavior of subsequent calls to $record->get($field) and $record[$field] so that the value returned is valid for embedding in an HTML page. If the mode is set to true and if the value of a field is a string which contains characters such as โ€˜<', โ€˜>', โ€˜โ€', and โ€˜&' which are meaningful to HTML those characters are replaced by HTML character entities by calling the PHP function htmlspecialchars(). Further if the value of the field is NULL or an empty string $record->get($field) returns the character entity โ€œ&nbsp;โ€ which is a โ€œnon-breaking spaceโ€. The method returns the previous value of the setting, which is initialized to false when the record is created. This method has one parameter:

parameter description
$newvalue boolean true to activate the value translation or boolean false to deactivate it.

Note that only those classes which either explicitly support this feature, or which always invoke Record::get to obtain the returned value support this feature.

Next: $record->get()

โš ๏ธ **GitHub.com Fallback** โš ๏ธ