Upgrade to 3.6.5
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Kirby\Panel;
|
||||
|
||||
use Kirby\Form\Form;
|
||||
use Kirby\Http\Uri;
|
||||
use Kirby\Toolkit\A;
|
||||
|
||||
/**
|
||||
@@ -387,6 +388,36 @@ abstract class Model
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns link url and tooltip
|
||||
* for optional sibling model and
|
||||
* preserves tab selection
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param \Kirby\Cms\ModelWithContent|null $model
|
||||
* @param string $tooltip
|
||||
* @return array
|
||||
*/
|
||||
protected function toPrevNextLink($model = null, string $tooltip = 'title'): ?array
|
||||
{
|
||||
if ($model === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = $model->panel()->toLink($tooltip);
|
||||
|
||||
if ($tab = get('tab')) {
|
||||
$uri = new Uri($data['link'], [
|
||||
'query' => ['tab' => $tab]
|
||||
]);
|
||||
|
||||
$data['link'] = $uri->toString();
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the url to the editing view
|
||||
* in the Panel
|
||||
|
Reference in New Issue
Block a user