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

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

issue #5903
Showing with 9 additions and 0 deletions
+9 -0
...@@ -176,6 +176,15 @@ class template ...@@ -176,6 +176,15 @@ class template
return $this->tabObject->by_object[$tab]->attributesAccess[$attr]; 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 /*! \brief Serialize this template for webservice
*/ */
function serialize() function serialize()
......
Supports Markdown
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