45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php namespace Studiovx\Marcleopold;
|
|
|
|
use System\Classes\PluginBase;
|
|
use Event;
|
|
use Graker\PhotoAlbums\Models\Album as GrakerAlbumModel;
|
|
use Graker\PhotoAlbums\Controllers\Albums as GrakerAlbumsController;
|
|
|
|
class Plugin extends PluginBase
|
|
{
|
|
public $require = ['graker.photoalbums'];
|
|
public function registerComponents()
|
|
{
|
|
}
|
|
|
|
public function registerSettings()
|
|
{
|
|
return [
|
|
// page in main settings menu
|
|
'settings' => [
|
|
'label' => 'Marc Leopold',
|
|
'description' => 'Marc Leopold Plugin settings.',
|
|
'icon' => 'icon-camera',
|
|
'class' => 'studiovx\marcleopold\Models\Settings',
|
|
'order' => 100,
|
|
]
|
|
];
|
|
}
|
|
|
|
public function boot()
|
|
{
|
|
|
|
GrakerAlbumsController::extendFormFields(function($form, $model, $context) {
|
|
if (!$model instanceof GrakerAlbumModel) {
|
|
return;
|
|
}
|
|
|
|
$form->addFields([
|
|
'sort_order' => [
|
|
'label' => 'Sort Order',
|
|
]
|
|
]);
|
|
});
|
|
}
|
|
}
|