cakephp 3引导ui更改上一个/下一个文本

cakephp 3引导ui更改上一个/下一个文本,cakephp,cakephp-3.0,cakephp-bootstrap-ui,Cakephp,Cakephp 3.0,Cakephp Bootstrap Ui,我有FriendsofCake引导ui插件。我在源代码中看到,它接受上一页和下一页标签的分页文本 不过,我不确定如何准确设置配置选项 PaginatorHelper.php if (isset($options['next'])) { if ($options['next'] === true) { $options['next'] = $this->config('labels.next'); } $opti

我有FriendsofCake引导ui插件。我在源代码中看到,它接受上一页和下一页标签的分页文本

不过,我不确定如何准确设置配置选项

PaginatorHelper.php

    if (isset($options['next'])) {
        if ($options['next'] === true) {
            $options['next'] = $this->config('labels.next');
        }
        $options['after'] = $this->next($options['next'], ['escape' => false]) . $options['after'];
    }
我在bootstrap.php中尝试了这一点,但没有效果

Configure::write('friendsofcake.PaginatorHelper.labels.prev', 'previous');
但是我看到它们也被设置在
\u结构中

回答

在Drmonkeynija的帮助下,这里是在AppView.php中配置标签所需的确切代码

$this->loadHelper(
    'Paginator',
    [
        'className' => 'BootstrapUI.Paginator',
        'labels' => [
            'prev' => 'previous',
            'next' => 'next',
        ]
    ]
);

这似乎是错误的记录,但要为助手配置任何设置,您需要在加载时将其作为数组传递。因此,例如,如果在AppView中加载Paginator帮助程序,您将传递
prev
,如下所示:-

$this->loadHelper(
    'Paginator', 
    [
        'className' => 'BootstrapUI.Paginator', 
        'prev' => 'previous'
    ]
);
感谢您的帮助:-)我已经更新了我的答案,以显示标签所需的确切代码。