Skip to content
Snippets Groups Projects
Commit 25913d05 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1561 from greezybacon/issue/1515


orgs: Add support for organization variables

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents f7458134 d20e6276
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment