public function LingotekNode::__get in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.2 lib/Drupal/lingotek/LingotekNode.php \LingotekNode::__get()
- 7.4 lib/Drupal/lingotek/LingotekNode.php \LingotekNode::__get()
Magic get for access to node and node properties.
File
- lib/
Drupal/ lingotek/ LingotekNode.php, line 154 - Defines LingotekNode.
Class
- LingotekNode
- A class wrapper for Lingotek-specific behavior on nodes.
Code
public function __get($property_name) {
$property = NULL;
if ($property === 'node') {
$property = $this->node;
}
elseif (isset($this->node->{$property_name})) {
$property = $this->node->{$property_name};
}
else {
// attempt to lookup the value in the lingonode table
$val = lingotek_lingonode($this->node->nid, $property_name);
$property = $val !== FALSE ? $val : $property;
}
return $property;
}