application/Espo/Core/HookManager.php
protected function getHookList($scope, $hookName)
    {
        $key = $scope . '_' . $hookName;

        if (!isset($this->hookListHash[$key])) {
            $hookList = array();

            if (isset($this->data['Common'][$hookName])) {
                $hookList = $this->data['Common'][$hookName];
            }

            if (isset($this->data[$scope][$hookName])) {
                $hookList = array_merge($hookList, $this->data[$scope][$hookName]);
                usort($hookList, array($this, 'cmpHooks'));
            }

            $normalizedList = array();
            foreach ($hookList as $hookData) {
                $normalizedList[] = $hookData['className'];
            }

            $this->hookListHash[$key] = $normalizedList;
        }

        return $this->hookListHash[$key];
    }
protected function getHookList($scope, $hookName)
    {
        $key = $scope . '_' . $hookName;

        if (!isset($this->hookListHash[$key])) {
            $hookList = array();

            if (isset($this->data['Common'][$hookName])) {
                $hookList = $this->data['Common'][$hookName];
            }

            if (isset($this->data[$scope][$hookName])) {
                $hookList = array_merge($hookList, $this->data[$scope][$hookName]);
                usort($hookList, array($this, 'cmpHooks'));
            }

            $normalizedList = array();
            foreach ($hookList as $hookData) {
                $normalizedList[] = $hookData['className'];
            }

            $this->hookListHash[$key] = $normalizedList;
        }

        return $this->hookListHash[$key];
    }
protected function getHookList ( $ scope , $ hookName ) { $ key = $ scope . '_' . $ hookName ; if ( ! isset ( $ this -> hookListHash [ $ key ] ) ) { $ hookList = array ( ) ; if ( isset ( $ this -> data [ 'Common' ] [ $ hookName ] ) ) { $ hookList = $ this -> data [ 'Common' ] [ $ hookName ] ; } if ( isset ( $ this -> data [ $ scope ] [ $ hookName ] ) ) { $ hookList = array_merge ( $ hookList , $ this -> data [ $ scope ] [ $ hookName ] ) ; usort ( $ hookList , array ( $ this , 'cmpHooks' ) ) ; } $ normalizedList = array ( ) ; foreach ( $ hookList as $ hookData ) { $ normalizedList [ ] = $ hookData [ 'className' ] ; } $ this -> hookListHash [ $ key ] = $ normalizedList ; } return $ this -> hookListHash [ $ key ] ; }
Get sorted hook list

@param  string $scope
@param  string $hookName

@return array
Get sorted hook list