Merge pull request #19226 from andreubisquerra/develop
TakePOS hooks improvements
This commit is contained in:
commit
f19b58c81d
@ -1121,14 +1121,24 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('takeposfrontend'));
|
$hookmanager->initHooks(array('takeposfrontend'));
|
||||||
$reshook = $hookmanager->executeHooks('ActionButtons');
|
$parameters = array('menus'=>$menus);
|
||||||
if (!empty($reshook)) {
|
$reshook = $hookmanager->executeHooks('ActionButtons', $parameters);
|
||||||
if (is_array($reshook) && !isset($reshook['title'])) {
|
if ($reshook == 0) { //add buttons
|
||||||
foreach ($reshook as $reshook) {
|
if (is_array($hookmanager->resArray) ) {
|
||||||
$menus[$r++] = $reshook;
|
foreach ($hookmanager->resArray as $resArray) {
|
||||||
|
foreach ($resArray as $butmenu) {
|
||||||
|
$menus[$r++] = $butmenu;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif ($reshook == 1) {
|
||||||
|
$r = 0; //replace buttons
|
||||||
|
if (is_array($hookmanager->resArray) ) {
|
||||||
|
foreach ($hookmanager->resArray as $resArray) {
|
||||||
|
foreach ($resArray as $butmenu) {
|
||||||
|
$menus[$r++] = $butmenu;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$menus[$r++] = $reshook;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user