public function getModuleHooks($module)
    {
        $hooks = $this->getHooksDefinitionsFromSugar($module);
        if (empty($hooks)) {
            return array();
        }

        $sortedHooks = array();
        $hooksDef = $this->getHooksDefinitionsFromFiles($module);

        // Process hooks in a specific order
        foreach ($this->modulesLogicHooksDef as $type => $hookDesc) {
            if (!array_key_exists($type, $hooks) || empty($hooks[$type])) {
                continue;
            }

            $i = 0;
            foreach ($hooks[$type] as $hook) {
                $num = str_pad($hook[0], 20, 0, \STR_PAD_LEFT) . '_' . $i;
                $sortedHooks[$type][$num] = array(
                    'Weight' => $hook[0],
                    'Description' => $hook[1],
                    'File' => $hook[2],
                    'Class' => $hook[3],
                    'Method' => $hook[4],
                    'Defined In' => $this->findHookInDefinition($hooksDef, $type, $hook[2], $hook[3], $hook[4]),
                );
                $i++;
            }
            ksort($sortedHooks[$type]);
            unset($hooks[$type]);
        }

        // Have I lost some hooks ?
        if (!empty($hooks)) {
            foreach ($hooks as $type => $hooks) {
                foreach ($hooks as $hook) {
                    if (empty($hook)) {
                        continue;
                    }
                    $sortedHooks[$type][] = array(
                        'Weight' => $hook[0],
                        'Description' => $hook[1],
                        'File' => $hook[2],
                        'Class' => $hook[3],
                        'Method' => $hook[4],
                        'Defined In' => $this->findHookInDefinition($hooksDef, $type, $hook[2], $hook[3], $hook[4]),
                    );
                }
            }
        }

        return $sortedHooks;
    }