public function init($modules = null)
    {
        if (!isset($modules)) {
            $modules = $this->module->getEnabled();
        }

        foreach ((array) $modules as $module) {

            if (empty($module['hooks'])) {
                continue;
            }

            foreach ($module['hooks'] as $method) {
                $this->register($method, $module['class']);
            }
        }

        return $this->hooks;
    }
public function init($modules = null)
    {
        if (!isset($modules)) {
            $modules = $this->module->getEnabled();
        }

        foreach ((array) $modules as $module) {

            if (empty($module['hooks'])) {
                continue;
            }

            foreach ($module['hooks'] as $method) {
                $this->register($method, $module['class']);
            }
        }

        return $this->hooks;
    }
public function init ( $ modules = null ) { if ( ! isset ( $ modules ) ) { $ modules = $ this -> module -> getEnabled ( ) ; } foreach ( ( array ) $ modules as $ module ) { if ( empty ( $ module [ 'hooks' ] ) ) { continue ; } foreach ( $ module [ 'hooks' ] as $ method ) { $ this -> register ( $ method , $ module [ 'class' ] ) ; } } return $ this -> hooks ; }
Registers module hooks
@param array|null $modules
@return array
Registers module hooks