use DOMDocument;
use DOMXPath;
use Friendica\App;
+use Friendica\AppHelper;
use Friendica\Content\Nav;
use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\Hook;
* - Infinite scroll data
* - head.tpl template
*
- * @param App $app The Friendica App instance
- * @param Arguments $args The Friendica App Arguments
- * @param L10n $l10n The l10n language instance
- * @param IManageConfigValues $config The Friendica configuration
- * @param IManagePersonalConfigValues $pConfig The Friendica personal configuration (for user)
- * @param int $localUID The local user id
+ * @param AppHelper $appHelper The Friendica App instance
+ * @param Arguments $args The Friendica App Arguments
+ * @param L10n $l10n The l10n language instance
+ * @param IManageConfigValues $config The Friendica configuration
+ * @param IManagePersonalConfigValues $pConfig The Friendica personal configuration (for user)
+ * @param int $localUID The local user id
*
* @throws HTTPException\InternalServerErrorException
*/
- private function initHead(App $app, Arguments $args, L10n $l10n, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, int $localUID)
+ private function initHead(AppHelper $appHelper, Arguments $args, L10n $l10n, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, int $localUID)
{
$interval = ($localUID ? $pConfig->get($localUID, 'system', 'update_interval') : 40000);
if (!empty(Renderer::$theme['stylesheet'])) {
$stylesheet = Renderer::$theme['stylesheet'];
} else {
- $stylesheet = $app->getCurrentThemeStylesheetPath();
+ $stylesheet = $appHelper->getCurrentThemeStylesheetPath();
}
$this->registerStylesheet($stylesheet);
* - Registered footer scripts (through App->registerFooterScript())
* - footer.tpl template
*
- * @param App $app The Friendica App instance
* @param Mode $mode The Friendica runtime mode
* @param L10n $l10n The l10n instance
*
/**
* Executes the creation of the current page and prints it to the screen
*
- * @param App $app The Friendica App
- * @param BaseURL $baseURL The Friendica Base URL
- * @param Arguments $args The Friendica App arguments
- * @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 AppHelper $appHelper The Friendica App
+ * @param BaseURL $baseURL The Friendica Base URL
+ * @param Arguments $args The Friendica App arguments
+ * @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 IManageConfigValues $config The Configuration of this node
+ * @param IManagePersonalConfigValues $pconfig The personal/user configuration
* @param Nav $nav
* @param int $localUID
* @throws HTTPException\MethodNotAllowedException
* @throws HTTPException\InternalServerErrorException
* @throws HTTPException\ServiceUnavailableException
*/
- public function run(App $app, UserSession $session, BaseURL $baseURL, Arguments $args, Mode $mode, ResponseInterface $response, L10n $l10n, Profiler $profiler, IManageConfigValues $config, IManagePersonalConfigValues $pconfig, Nav $nav, int $localUID)
+ public function run(AppHelper $appHelper, UserSession $session, BaseURL $baseURL, Arguments $args, Mode $mode, ResponseInterface $response, L10n $l10n, Profiler $profiler, IManageConfigValues $config, IManagePersonalConfigValues $pconfig, Nav $nav, int $localUID)
{
$moduleName = $args->getModuleName();
$this->initContent($response, $mode);
// Load current theme info after module has been initialized as theme could have been set in module
- $currentTheme = $app->getCurrentTheme();
+ $currentTheme = $appHelper->getCurrentTheme();
$theme_info_file = 'view/theme/' . $currentTheme . '/theme.php';
if (file_exists($theme_info_file)) {
require_once $theme_info_file;
*
*/
-use Friendica\App;
+use Friendica\AppHelper;
use Friendica\DI;
/**
*
* @todo Check if this is really needed.
*/
-function load_page(App $a)
+function load_page(AppHelper $appHelper)
{
if (isset($_GET['mode']) && ($_GET['mode'] == 'minimal')) {
require 'view/theme/frio/minimal.php';
} elseif ((isset($_GET['mode']) && ($_GET['mode'] == 'none'))) {
require 'view/theme/frio/none.php';
} else {
- $template = 'view/theme/' . $a->getCurrentTheme() . '/'
+ $template = 'view/theme/' . $appHelper->getCurrentTheme() . '/'
. ((DI::page()['template'] ?? '') ?: 'default' ) . '.php';
if (file_exists($template)) {
require_once $template;
} else {
- require_once str_replace('theme/' . $a->getCurrentTheme() . '/', '', $template);
+ require_once str_replace('theme/' . $appHelper->getCurrentTheme() . '/', '', $template);
}
}
}