application/Espo/Core/HookManager.php
protected function sortHooks(array $hooks)
    {
        foreach ($hooks as $scopeName => &$scopeHooks) {
            foreach ($scopeHooks as $hookName => &$hookList) {
                usort($hookList, array($this, 'cmpHooks'));
            }
        }

        return $hooks;
    }
protected function sortHooks(array $hooks)
    {
        foreach ($hooks as $scopeName => &$scopeHooks) {
            foreach ($scopeHooks as $hookName => &$hookList) {
                usort($hookList, array($this, 'cmpHooks'));
            }
        }

        return $hooks;
    }
protected function sortHooks ( array $ hooks ) { foreach ( $ hooks as $ scopeName => & $ scopeHooks ) { foreach ( $ scopeHooks as $ hookName => & $ hookList ) { usort ( $ hookList , array ( $ this , 'cmpHooks' ) ) ; } } return $ hooks ; }
Sort hooks by an order

@param  array  $hooks

@return array
Sort hooks by an order