This repository has been archived by the owner on Aug 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add block fixes and hook for scribite use
- Loading branch information
Showing
8 changed files
with
66 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the ZikulaModules\StaticContentModule package. | ||
* | ||
* Copyright Zikula - https://ziku.la/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Zikula\StaticContentModule\HookSubscriber; | ||
|
||
use Symfony\Contracts\Translation\TranslatorInterface; | ||
use Zikula\Bundle\HookBundle\Category\UiHooksCategory; | ||
use Zikula\Bundle\HookBundle\HookSubscriberInterface; | ||
|
||
class UiHooksSubscriber implements HookSubscriberInterface | ||
{ | ||
public const HTMLBLOCK_EDIT_FORM = 'staticcontent.ui_hooks.htmlblock.content.form_edit'; | ||
|
||
/** | ||
* @var TranslatorInterface | ||
*/ | ||
private $translator; | ||
|
||
public function __construct(TranslatorInterface $translator) | ||
{ | ||
$this->translator = $translator; | ||
} | ||
|
||
public function getOwner(): string | ||
{ | ||
return 'ZikulaStaticContentModule'; | ||
} | ||
|
||
public function getCategory(): string | ||
{ | ||
return UiHooksCategory::NAME; | ||
} | ||
|
||
public function getTitle(): string | ||
{ | ||
return $this->translator->trans('HTML Block content hook'); | ||
} | ||
|
||
public function getAreaName(): string | ||
{ | ||
return 'subscriber.staticcontentmodule.ui_hooks.htmlblock_content'; | ||
} | ||
|
||
public function getEvents(): array | ||
{ | ||
return [ | ||
UiHooksCategory::TYPE_FORM_EDIT => self::HTMLBLOCK_EDIT_FORM | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{{ form_widget(form) }} | ||
{{ notifyDisplayHooks(constant('Zikula\\BlocksModule\\HookSubscriber\\UiHooksSubscriber::HTMLBLOCK_EDIT_FORM'), form.vars.value.bid|default(null)) }} | ||
{{ notifyDisplayHooks(constant('Zikula\\StaticContentModule\\HookSubscriber\\UiHooksSubscriber::HTMLBLOCK_EDIT_FORM'), form.vars.value.bid|default(null)) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters