Commit 029beca3 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

feat(template) Add function to detect which template tab contains a given attribute

issue #5903
parent 929b0a88
......@@ -176,6 +176,15 @@ class template
return $this->tabObject->by_object[$tab]->attributesAccess[$attr];
}
function getAttributeTab($attr)
{
foreach ($this->tabObject->by_object as $tab => $tabObject) {
if (isset($tabObject->attributesAccess[$attr])) {
return $tab;
}
}
}
/*! \brief Serialize this template for webservice
*/
function serialize()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment