Skip to content

Commit

Permalink
NGSTACK-835: code rename
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed May 6, 2024
1 parent feb79d8 commit 63ed7eb
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 43 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ ibexa:
Next, import the routes into your project:
```yaml
netgen_better_ibexa_admin_ui:
resource: '@NetgenBetterIbexaAdminUIBundle/Resources/config/routing.yaml'
netgen_ibexa_admin_ui_extra:
resource: '@NetgenIbexaAdminUIExtraBundle/Resources/config/routing.yaml'
```
Licensed under [GPLv2](LICENSE)
6 changes: 3 additions & 3 deletions bundle/Controller/Content/UpdateAlwaysAvailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Controller\Content;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Controller\Content;

use Ibexa\Contracts\AdminUi\Controller\Controller;
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException;
use Ibexa\Core\Helper\TranslationHelper;
use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory;
use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand All @@ -33,7 +33,7 @@ public function __invoke(int $id, Request $request): Response
if ($form->isSubmitted() && $form->isValid()) {
$contentInfo = $this->contentService->loadContentInfo($id);

/** @var \Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData $data */
/** @var \Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData $data */
$data = $form->getData();
$alwaysAvailable = $data->getAlwaysAvailable();

Expand Down
2 changes: 1 addition & 1 deletion bundle/DependencyInjection/Compiler/SearchOverridePass.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\DependencyInjection\Compiler;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\DependencyInjection;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Loader\DelegatingLoader;
Expand All @@ -17,7 +17,7 @@

use function file_get_contents;

final class NetgenBetterIbexaAdminUIExtension extends Extension implements PrependExtensionInterface
final class NetgenIbexaAdminUIExtraExtension extends Extension implements PrependExtensionInterface
{
public function load(array $configs, ContainerBuilder $container): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Data\Content;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Data\Content;

class ContentUpdateAlwaysAvailableData
{
Expand Down
7 changes: 3 additions & 4 deletions bundle/Form/FormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Form;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Form;

use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo;
use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData;
use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Type\Content\Translation\AlwaysAvailableUpdateType;
use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData;
use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Type\Content\Translation\AlwaysAvailableUpdateType;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Type\Content\Translation;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Type\Content\Translation;

use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData;
use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Data\Content\ContentUpdateAlwaysAvailableData;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\FormBuilderInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle;

use Netgen\Bundle\BetterIbexaAdminUIBundle\DependencyInjection\Compiler\SearchOverridePass;
use Netgen\Bundle\IbexaAdminUIExtraBundle\DependencyInjection\Compiler\SearchOverridePass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

final class NetgenBetterIbexaAdminUIBundle extends Bundle
final class NetgenIbexaAdminUIExtraBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
Expand Down
4 changes: 2 additions & 2 deletions bundle/Resources/config/routing.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
netgen.better_ibexa_admin_ui.content.update_always_available:
netgen.ibexa_admin_ui_extra.content.update_always_available:
path: /content/{id}/update-always-available
methods: ['POST']
controller: 'Netgen\Bundle\BetterIbexaAdminUIBundle\Controller\Content\UpdateAlwaysAvailable'
controller: 'Netgen\Bundle\IbexaAdminUIExtraBundle\Controller\Content\UpdateAlwaysAvailable'
requirements:
id: \d+
4 changes: 2 additions & 2 deletions bundle/Resources/config/services/controllers.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
Netgen\Bundle\BetterIbexaAdminUIBundle\Controller\Content\UpdateAlwaysAvailable:
Netgen\Bundle\IbexaAdminUIExtraBundle\Controller\Content\UpdateAlwaysAvailable:
parent: Ibexa\Contracts\AdminUi\Controller\Controller
arguments:
- '@translator'
- '@ibexa.api.service.content'
- '@Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory'
- '@Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory'
- '@Ibexa\Core\Helper\TranslationHelper'
4 changes: 2 additions & 2 deletions bundle/Resources/config/services/forms.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
Netgen\Bundle\BetterIbexaAdminUIBundle\Form\Type\Content\Translation\AlwaysAvailableUpdateType: ~
Netgen\Bundle\IbexaAdminUIExtraBundle\Form\Type\Content\Translation\AlwaysAvailableUpdateType: ~

Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory:
Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory:
arguments:
- '@form.factory'
4 changes: 2 additions & 2 deletions bundle/Resources/config/services/tabs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
services:
Netgen\Bundle\BetterIbexaAdminUIBundle\Tab\LocationView\TranslationsTab:
Netgen\Bundle\IbexaAdminUIExtraBundle\Tab\LocationView\TranslationsTab:
decorates: Ibexa\AdminUi\Tab\LocationView\TranslationsTab
decoration_inner_name: TranslationsTab.inner
arguments:
- '@TranslationsTab.inner'
- '@Ibexa\Core\Repository\Permission\PermissionResolver'
- '@Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory'
- '@Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory'
- '@twig'
- '@translator'
- '@event_dispatcher'
8 changes: 4 additions & 4 deletions bundle/Resources/config/services/templating.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
services:
netgen.better_ibexa_admin_ui.twig.runtime.better_ibexa_admin_ui:
class: Netgen\Bundle\BetterIbexaAdminUIBundle\Templating\Twig\BetterIbexaAdminUIRuntime
netgen.ibexa_admin_ui_extra.twig.runtime.ibexa_admin_ui_extra:
class: Netgen\Bundle\IbexaAdminUIExtraBundle\Templating\Twig\IbexaAdminUIExtraRuntime
arguments:
- "@ibexa.api.service.content"
tags:
- { name: twig.runtime }

netgen.better_ibexa_admin_ui.twig.extension.better_ibexa_admin_ui:
class: Netgen\Bundle\BetterIbexaAdminUIBundle\Templating\Twig\BetterIbexaAdminUIExtension
netgen.ibexa_admin_ui_extra.twig.extension.ibexa_admin_ui_extra:
class: Netgen\Bundle\IbexaAdminUIExtraBundle\Templating\Twig\IbexaAdminUIExtraExtension
tags:
- { name: twig.extension }
2 changes: 2 additions & 0 deletions bundle/Resources/translations/locationview.en.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
content.update_always_available.title: "Make available in the main language when missing translations"
content.update_always_available.success.available: "Content '%name%' marked as always available."
content.update_always_available.success.not_available: "Content '%name%' unmarked as always available."
content.update_always_available.toggle_widget.label.on: "On"
content.update_always_available.toggle_widget.label.off: "Off"
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
/>
</label>
<span class="ibexa-toggle__label ibexa-toggle__label--on">
{{ 'toggle_widget.label.on'|trans }}
{{ 'content.update_always_available.toggle_widget.label.on'|trans }}
</span>
<span class="ibexa-toggle__label ibexa-toggle__label--off mr-2">
{{ 'toggle_widget.label.off'|trans }}
{{ 'content.update_always_available.toggle_widget.label.off'|trans }}
</span>
</div>
</div>

{{ form_start(form_always_available_update, { action: path('netgen.better_ibexa_admin_ui.content.update_always_available', { id: content.id }) }) }}
{{ form_start(form_always_available_update, { action: path('netgen.ibexa_admin_ui_extra.content.update_always_available', { id: content.id }) }) }}
{{ form_row(form_always_available_update.always_available, { label_attr: { hidden: true } }) }}
{{ form_end(form_always_available_update) }}
{% endif %}
4 changes: 2 additions & 2 deletions bundle/Tab/LocationView/TranslationsTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Tab\LocationView;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Tab\LocationView;

use Ibexa\AdminUi\Tab\LocationView\TranslationsTab as IbexaTranslationsTab;
use Ibexa\Contracts\AdminUi\Tab\AbstractEventDispatchingTab;
use Ibexa\Contracts\AdminUi\Tab\OrderedTabInterface;
use Ibexa\Contracts\Core\Repository\PermissionResolver;
use Netgen\Bundle\BetterIbexaAdminUIBundle\Form\FormFactory;
use Netgen\Bundle\IbexaAdminUIExtraBundle\Form\FormFactory;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Templating\Twig;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Templating\Twig;

use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

final class BetterIbexaAdminUIExtension extends AbstractExtension
final class IbexaAdminUIExtraExtension extends AbstractExtension
{
public function getFunctions(): array
{
return [
new TwigFunction(
'ng_count_content_by_content_type',
[BetterIbexaAdminUIRuntime::class, 'countContentByContentType'],
[IbexaAdminUIExtraRuntime::class, 'countContentByContentType'],
),
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

declare(strict_types=1);

namespace Netgen\Bundle\BetterIbexaAdminUIBundle\Templating\Twig;
namespace Netgen\Bundle\IbexaAdminUIExtraBundle\Templating\Twig;

use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion;
use Ibexa\Contracts\Core\Repository\Values\Filter\Filter;
use Twig\Extension\RuntimeExtensionInterface;

final class BetterIbexaAdminUIRuntime implements RuntimeExtensionInterface
final class IbexaAdminUIExtraRuntime implements RuntimeExtensionInterface
{
private ContentService $contentService;

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
}
],
"require": {
"ibexa/admin-ui": "^4.4"
"ibexa/admin-ui": "^4.6"
},
"require-dev": {
"netgen/ibexa-site-api": "^5.4",
"netgen/ibexa-site-api": "^6.1",
"ibexa/graphql": "^4.5"
},
"autoload": {
"psr-4": {
"Netgen\\Bundle\\BetterIbexaAdminUIBundle\\": "bundle"
"Netgen\\Bundle\\IbexaAdminUIExtraBundle\\": "bundle"
}
},
"extra": {
Expand Down

0 comments on commit 63ed7eb

Please sign in to comment.