mirror of
https://github.com/friendica/friendica
synced 2025-05-01 05:44:24 +02:00
Convert Content\Nav to dynamic object
- Remove DI dependency in Module\Apps
This commit is contained in:
parent
f17d1f359f
commit
d0648b10ef
5 changed files with 159 additions and 111 deletions
|
@ -27,18 +27,18 @@ use DOMXPath;
|
|||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Theme;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\Profiler;
|
||||
use Friendica\Util\Strings;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
|
@ -407,13 +407,16 @@ class Page implements ArrayAccess
|
|||
* @param Mode $mode The current node mode
|
||||
* @param ResponseInterface $response The Response of the module class, including type, content & headers
|
||||
* @param L10n $l10n The l10n language class
|
||||
* @param Profiler $profiler
|
||||
* @param IManageConfigValues $config The Configuration of this node
|
||||
* @param IManagePersonalConfigValues $pconfig The personal/user configuration
|
||||
* @param int $localUID The UID of the local user
|
||||
*
|
||||
* @throws HTTPException\InternalServerErrorException|HTTPException\ServiceUnavailableException
|
||||
* @param Nav $nav
|
||||
* @param int $localUID
|
||||
* @throws HTTPException\MethodNotAllowedException
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws HTTPException\ServiceUnavailableException
|
||||
*/
|
||||
public function run(App $app, BaseURL $baseURL, Arguments $args, Mode $mode, ResponseInterface $response, L10n $l10n, Profiler $profiler, IManageConfigValues $config, IManagePersonalConfigValues $pconfig, int $localUID)
|
||||
public function run(App $app, BaseURL $baseURL, Arguments $args, Mode $mode, ResponseInterface $response, L10n $l10n, Profiler $profiler, IManageConfigValues $config, IManagePersonalConfigValues $pconfig, Nav $nav, int $localUID)
|
||||
{
|
||||
$moduleName = $args->getModuleName();
|
||||
|
||||
|
@ -463,7 +466,7 @@ class Page implements ArrayAccess
|
|||
// Add the navigation (menu) template
|
||||
if ($moduleName != 'install' && $moduleName != 'maintenance') {
|
||||
$this->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('nav_head.tpl'), []);
|
||||
$this->page['nav'] = Nav::build($app);
|
||||
$this->page['nav'] = $nav->getHtml();
|
||||
}
|
||||
|
||||
foreach ($response->getHeaders() as $key => $header) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue