diff --git a/include/class.organization.php b/include/class.organization.php index 785b6d36b489416b99c164efcb6f20865cc6f250..991952bd9807d91658c361985c1c81f940354438 100644 --- a/include/class.organization.php +++ b/include/class.organization.php @@ -243,6 +243,20 @@ class Organization extends OrganizationModel { return (string) $this->getName(); } + function asVar() { + return (string) $this->getName(); + } + + function getVar($tag) { + if($tag && is_callable(array($this, 'get'.ucfirst($tag)))) + return call_user_func(array($this, 'get'.ucfirst($tag))); + + $tag = mb_strtolower($tag); + foreach ($this->getDynamicData() as $e) + if ($a = $e->getAnswer($tag)) + return $a; + } + function update($vars, &$errors) { $valid = true;