function _phonefield_linklabel in Phone Field 7
Helper function to compute linklabel.
3 calls to _phonefield_linklabel()
- theme_phonefield_formatter_phonefield_default in ./
phonefield.module - Theme function for 'default' text field formatter.
- theme_phonefield_formatter_phonefield_separate_link in ./
phonefield.module - Theme function for 'separate_link' text field formatter.
- theme_phonefield_formatter_phonefield_separate_plain in ./
phonefield.module - Theme function for 'separate_plain' text field formatter.
File
- ./
phonefield.module, line 384 - Hooks for a module that defines a simple phone number field type.
Code
function _phonefield_linklabel($elementlabel, $settings) {
$linkstate = $settings['linkstate'];
$linkvalue = $settings['linkvalue'];
switch ($linkstate) {
case 'static':
$linklabel = $linkvalue;
break;
case 'none':
$linklabel = '';
break;
default:
$linklabel = !empty($elementlabel) ? $elementlabel : $linkvalue;
break;
}
return $linklabel;
}