Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update limitControl in PaginatorHelper.php #12806

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Mailer/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,7 @@ public function getTemplate()
*
* @param string|null $layout Layout name or null to not use
* @return $this
* @deprecated 3.7.0 Use $email->viewBuilder()->setLayout() instead.
*/
public function setLayout($layout)
{
Expand All @@ -1303,6 +1304,7 @@ public function setLayout($layout)
/**
* Gets layout.
*
* @deprecated 3.7.0 Use $email->viewBuilder()->getLayout() instead.
* @return string
*/
public function getLayout()
Expand Down Expand Up @@ -1432,6 +1434,7 @@ public function viewVars($viewVars = null)
*
* @param string $theme Theme name.
* @return $this
* @deprecated 3.7.0 Use $email->viewBuilder()->setTheme() instead.
*/
public function setTheme($theme)
{
Expand All @@ -1448,6 +1451,7 @@ public function setTheme($theme)
* Gets theme to use when rendering.
*
* @return string
* @deprecated 3.7.0 Use $email->viewBuilder()->getTheme() instead.
*/
public function getTheme()
{
Expand Down Expand Up @@ -1483,6 +1487,7 @@ public function theme($theme = null)
*
* @param array $helpers Helpers list.
* @return $this
* @deprecated 3.7.0 Use $email->viewBuilder()->setHelpers() instead.
*/
public function setHelpers(array $helpers)
{
Expand All @@ -1499,6 +1504,7 @@ public function setHelpers(array $helpers)
* Gets helpers to be used when rendering.
*
* @return array
* @deprecated 3.7.0 Use $email->viewBuilder()->getHelpers() instead.
*/
public function getHelpers()
{
Expand Down
9 changes: 8 additions & 1 deletion src/View/Helper/PaginatorHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,14 @@ public function implementedEvents()
*/
public function limitControl(array $limits = [], $default = null, array $options = [])
{
$out = $this->Form->create(null, ['type' => 'get']);
$fopt = array();
yosiazwan marked this conversation as resolved.
Show resolved Hide resolved
$fopt['type'] = 'get';
if (isset($options['form'])) {
$fopt = array_merge($fopt,$options['form']);
yosiazwan marked this conversation as resolved.
Show resolved Hide resolved
}
unset($options['form']);

$out = $this->Form->create(null, $fopt);

if (empty($default) || !is_numeric($default)) {
$default = $this->param('perPage');
Expand Down
5 changes: 3 additions & 2 deletions src/View/ViewBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -637,9 +637,10 @@ public function name($name = null)
* Sets the view classname.
*
* Accepts either a short name (Ajax) a plugin name (MyPlugin.Ajax)
* or a fully namespaced name (App\View\AppView).
* or a fully namespaced name (App\View\AppView) or null to use the
* View class provided by CakePHP.
*
* @param string $name The class name for the view.
* @param string|null $name The class name for the view.
* @return $this
*/
public function setClassName($name)
Expand Down