1. Go to this page and download the library: Download sylvainjule/bouncer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sylvainjule / bouncer example snippets
return [
'sylvainjule.bouncer.list' => [
'test' => [ // match the filename without extension of the user blueprint
'fieldname' => 'canaccess'
]
]
];
return [
'sylvainjule.bouncer.list' => [
'test' => [ // match the filename without extension of the user blueprint
'extra' => [
[
'title' => 'Area title',
'path' => '/area-path'
]
]
]
]
];
// Anywhere in any blueprint
(...)
sections:
bouncernav:
type: bouncernav
return [
'sylvainjule.bouncer.list' => [
'test' => [ // match the filename without extension of the user blueprint
'fallback' => '/fallback-path'
]
]
];
class ExamplePage extends Page {
public function isMovableTo(Kirby\Cms\Page|Kirby\Cms\Site $parent): bool {
return Bouncer::isMovableTo($this, $parent);
}
};
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.