Skip to content

Commit

Permalink
add bulk update
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Oct 21, 2023
1 parent a5b2773 commit f5d9cd9
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 21 deletions.
1 change: 0 additions & 1 deletion Controllers/Abstracts/AbstractAdministrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use ArrayAccess\TrayDigita\Traits\Service\TranslatorTrait;
use ArrayAccess\TrayDigita\Util\Filter\DataNormalizer;
use Psr\Http\Message\ServerRequestInterface;
use function var_dump;

abstract class AbstractAdministrationController extends AbstractAuthenticationBasedController
{
Expand Down
11 changes: 8 additions & 3 deletions Controllers/MainPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@
class MainPage extends AbstractController
{
#[Any('')]
public function main() : ResponseInterface
{
public function main(
ResponseInterface $response
) : ResponseInterface {
return $this
->render('templates/home');
->render(
'templates/home',
[],
$response
);
}

// handle favicon
Expand Down
5 changes: 1 addition & 4 deletions Controllers/User/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ class Auth extends AbstractUserController
priority: PHP_INT_MIN
)]
public function login(
ServerRequestInterface $request,
ResponseInterface $response,
array $params
ResponseInterface $response
): ResponseInterface {
return $this->render(
'user/login',
Expand All @@ -36,6 +34,5 @@ public function login(
],
$response
);
// return new \ArrayAccess\TrayDigita\Responder\FileResponder\FileResponder(__FILE__);
}
}
1 change: 0 additions & 1 deletion Controllers/User/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Main extends AbstractUserController
priority: PHP_INT_MAX - 1000
)]
public function dashboard(
ServerRequestInterface $request,
ResponseInterface $response
) : ResponseInterface {
return $this->render(
Expand Down
6 changes: 3 additions & 3 deletions Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ private function doOverrideController(): void
}
$factoryControllerNamespace = $core->getKernel()->getControllerNameSpace();
$controllerNamespace = __NAMESPACE__ .'\\Controller\\';
$controllerDir = __DIR__ . DIRECTORY_SEPARATOR . 'Controllers';
Consolidation::registerAutoloader($controllerNamespace, $controllerDir);
$controllerDirectory = __DIR__ . DIRECTORY_SEPARATOR . 'Controllers';
Consolidation::registerAutoloader($controllerNamespace, $controllerDirectory);
$this->{'controllerNameSpace'} = $controllerNamespace;
$this->{'registeredDirectories'}[$controllerNamespace] = $controllerDir;
$this->{'registeredDirectories'}[$controllerNamespace] = $controllerDirectory;
})->call($kernel, $this);
if (!$factoryControllerNamespace) {
return;
Expand Down
29 changes: 22 additions & 7 deletions Languages/core-module.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: TrayDigita Core Module 1.0.0\n"
"POT-Creation-Date: 2023-10-19 03:54+0700\n"
"POT-Creation-Date: 2023-10-22 02:40+0700\n"
"PO-Revision-Date: 2023-09-24 19:00+0700\n"
"Last-Translator: ArrayAccess\n"
"Language-Team: ArrayAccess\n"
Expand Down Expand Up @@ -33,12 +33,16 @@ msgctxt "benchmark"
msgid "Event"
msgstr ""

#: Core.php:115
#: Controllers/User/Auth.php:31
msgid "Login to member area"
msgstr ""

#: Core.php:184
msgctxt "module-info"
msgid "Core"
msgstr ""

#: Core.php:132
#: Core.php:201
msgctxt "module-info"
msgid "Main core module"
msgstr ""
Expand Down Expand Up @@ -148,12 +152,12 @@ msgid ""
"record for scheduler"
msgstr ""

#: SubModules/ServiceInitializer/ServiceInitializer.php:37
#: SubModules/ServiceInitializer/ServiceInitializer.php:39
msgctxt "module-info"
msgid "Service Initializer"
msgstr ""

#: SubModules/ServiceInitializer/ServiceInitializer.php:46
#: SubModules/ServiceInitializer/ServiceInitializer.php:48
msgctxt "module-info"
msgid "Core module to make application run properly"
msgstr ""
Expand All @@ -168,12 +172,12 @@ msgctxt "module-info"
msgid "Core module for site"
msgstr ""

#: SubModules/Templates/Templates.php:27
#: SubModules/Templates/Templates.php:26
msgctxt "module-info"
msgid "Templates Helper"
msgstr ""

#: SubModules/Templates/Templates.php:36
#: SubModules/Templates/Templates.php:35
msgctxt "module-info"
msgid "Core module to support templating"
msgstr ""
Expand All @@ -188,6 +192,7 @@ msgctxt "module-info"
msgid "Core module to support translation"
msgstr ""

#: SubModules/ServiceInitializer/Controllers/Views/contents/config-install.phtml:22
#: SubModules/ServiceInitializer/Controllers/Views/contents/config-unavailable.phtml:22
#: SubModules/ServiceInitializer/Controllers/Views/install.phtml:30
msgctxt "installation"
Expand All @@ -205,3 +210,13 @@ msgid "Required Module Not Found"
msgid_plural "Required Modules Not Found"
msgstr[0] ""
msgstr[1] ""

#: SubModules/ServiceInitializer/Controllers/Views/repair.phtml:31
msgctxt "module-not-found"
msgid "Incomplete Database Schema"
msgstr ""

#: SubModules/ServiceInitializer/Controllers/Views/repair.phtml:40
msgctxt "incomplete-schema"
msgid "Database schema are incomplete"
msgstr ""
1 change: 0 additions & 1 deletion SubModules/Controllers/Attributes/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use function in_array;
use function str_starts_with;
use function substr;
use function var_dump;

#[Attribute(Attribute::TARGET_CLASS)]
class Dashboard extends Group
Expand Down
1 change: 0 additions & 1 deletion SubModules/Templates/Middlewares/TemplateMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ protected function doProcess(ServerRequestInterface $request): ServerRequestInte
if (is_string($active)) {
$this->templates->getTemplateRule()->setActive($active);
}

$template = $this->templates->getTemplateRule()->getActive();
if ($template) {
if ($template->getBasePath() !== $active && $option) {
Expand Down
1 change: 1 addition & 0 deletions SubModules/Templates/Templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private function initSetTemplate($module, KernelInterface $kernel)
$view->getContainer()??$this->getContainer()
)
);

return $module;
}
}

0 comments on commit f5d9cd9

Please sign in to comment.