覆盖包中的身份验证类型 form.php

Overwrite Authentication Type's form.php in a Package

我正在尝试为 'concrete' 身份验证类型覆盖 form.php 文件。如果我将 form.php 文件放在 /application/authentication/concrete 目录中,而不是在我的主题包目录中,我可以让它工作。

<?php foreach ($activeAuths as $auth): ?>
    <div data-handle="<?= $auth->getAuthenticationTypeHandle(); ?>" class="authentication-type authentication-type-<?= $auth->getAuthenticationTypeHandle(); ?>">
        <?php $auth->renderForm($authTypeElement ?: 'form', $authTypeParams ?: array()); ?>
    </div>
<?php endforeach; ?>

如果我尝试加载另一个表单(通过替换 renderForm 方法中的第二个参数)没有任何反应。

关于如何让 c5 知道覆盖的任何想法?

你不能。我已经开发了一个需要这样做的包,并且不能从包中覆盖它。您必须从应用程序目录执行此操作。

我的包有一个 "install" 选项,可以将修改后的表单从包的目录复制到应用程序目录。