Code Duplication    Length = 37-37 lines in 2 locations

src/system/BlocksModule/HookSubscriber/UiHooksSubscriber.php 1 location

@@ 18-54 (lines=37) @@
15
use Zikula\Bundle\HookBundle\HookSubscriberInterface;
16
use Zikula\Common\Translator\TranslatorInterface;
17
18
class UiHooksSubscriber implements HookSubscriberInterface
19
{
20
    /**
21
     * @var TranslatorInterface
22
     */
23
    private $translator;
24
25
    /**
26
     * @param TranslatorInterface $translator
27
     */
28
    public function __construct(TranslatorInterface $translator)
29
    {
30
        $this->translator = $translator;
31
    }
32
33
    public function getOwner()
34
    {
35
        return 'ZikulaBlocksModule';
36
    }
37
38
    public function getCategory()
39
    {
40
        return UiHooksCategory::NAME;
41
    }
42
43
    public function getTitle()
44
    {
45
        return $this->translator->__('HTML Block content hook');
46
    }
47
48
    public function getEvents()
49
    {
50
        return [
51
            UiHooksCategory::TYPE_FORM_EDIT => 'blocks.ui_hooks.htmlblock.content.form_edit'
52
        ];
53
    }
54
}
55

src/system/MailerModule/HookSubscriber/UiHooksSubscriber.php 1 location

@@ 18-54 (lines=37) @@
15
use Zikula\Bundle\HookBundle\HookSubscriberInterface;
16
use Zikula\Common\Translator\TranslatorInterface;
17
18
class UiHooksSubscriber implements HookSubscriberInterface
19
{
20
    /**
21
     * @var TranslatorInterface
22
     */
23
    private $translator;
24
25
    /**
26
     * @param TranslatorInterface $translator
27
     */
28
    public function __construct(TranslatorInterface $translator)
29
    {
30
        $this->translator = $translator;
31
    }
32
33
    public function getOwner()
34
    {
35
        return 'ZikulaMailerModule';
36
    }
37
38
    public function getCategory()
39
    {
40
        return UiHooksCategory::NAME;
41
    }
42
43
    public function getTitle()
44
    {
45
        return $this->translator->__('HTML mail hook');
46
    }
47
48
    public function getEvents()
49
    {
50
        return [
51
            UiHooksCategory::TYPE_FORM_EDIT => 'mailer.ui_hooks.htmlmail.form_edit'
52
        ];
53
    }
54
}
55