remove unused code

This commit is contained in:
Diatrex 2020-11-25 16:45:18 +03:00
parent 0a347a810d
commit c9bc237f3a
3 changed files with 5 additions and 96 deletions

View File

@ -4,12 +4,6 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class AdvFormBuilder extends FormBuilder
{
/**
* The form fields.
*
* @var array|string
*/
protected $fields = [
'name' => [
'translatable' => true,
@ -65,61 +59,20 @@ class AdvFormBuilder extends FormBuilder
];
protected $category = null;
/**
* Additional validation rules.
*
* @var array|string
*/
protected $rules = [];
/**
* Fields to skip.
*
* @var array|string
*/
protected $skips = [];
/**
* The form actions.
*
* @var array|string
*/
protected $actions = [];
/**
* The form buttons.
*
* @var array|string
*/
protected $buttons = [
'cancel',
];
/**
* The form options.
*
* @var array
*/
protected $options = [];
/**
* The form sections.
*
* @var array
*/
protected $sections = [];
/**
* The form assets.
*
* @var array
*/
protected $assets = [];
// public function setType(CategoryInterface $category)
// {
// $this->category = $category;
// return $this;
// }
}

View File

@ -4,32 +4,19 @@ use Anomaly\Streams\Platform\Addon\Module\Module;
class AdvsModule extends Module
{
/**
* The navigation display flag.
*
* @var bool
*/
protected $navigation = true;
/**
* The addon icon.
*
* @var string
*/
protected $icon = 'fa fa-plus-circle';
/**
* The module sections.
*
* @var array
*/
protected $sections = [
'advs' => [
'buttons' => [
'new_adv' => [
'new_classified' => [
'href' => "/advs/create_adv",
],
'new_adv' => [
'text' => 'visiosoft.module.advs::button.fast_create'
],
'extend_all' => [
'href' => "/advs/extendAll/admin",
'icon' => 'fa fa-calendar',
@ -54,17 +41,6 @@ class AdvsModule extends Module
'title' => 'visiosoft.module.advs::section.assets_clear.name',
'href' => '/admin/assets/clear',
]
// 'custom_fields' => [
// 'buttons' => [
// 'new_custom_field',
// ],
// ],
// 'custom_field_advs' => [
// // 'buttons' => [
// // 'new_custom_field_adv',
// // ],
// ],
];
}

View File

@ -10,7 +10,6 @@ use Visiosoft\AdvsModule\Adv\AdvRepository;
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
use Visiosoft\AdvsModule\Adv\AdvModel;
use Visiosoft\AdvsModule\Adv\Form\AdvFormBuilder;
use Visiosoft\AdvsModule\Adv\Listeners\AddTableCategoryColumn;
use Visiosoft\AdvsModule\Http\Middleware\redirectDiffrentLang;
use Visiosoft\AdvsModule\Http\Middleware\SetLang;
use Visiosoft\AdvsModule\Listener\AddAdvsSettingsScript;
@ -27,8 +26,6 @@ use Visiosoft\LocationModule\Village\VillageRepository;
use Visiosoft\LocationModule\Village\VillageModel;
use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface;
use Visiosoft\CatsModule\Category\CategoryRepository;
use Visiosoft\CatsModule\Category\CategoryModel;
use Illuminate\Routing\Router;
use Visiosoft\LocationModule\Country\Contract\CountryRepositoryInterface;
use Visiosoft\LocationModule\Country\CountryRepository;
@ -228,25 +225,12 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
];
protected $bindings = [
// AdvsCfValuesEntryModel::class => CfValueModel::class,
// AdvsCustomFieldAdvsEntryModel::class => CustomFieldAdvModel::class,
// AdvsCustomFieldsEntryModel::class => CustomFieldModel::class,
AdvsAdvsEntryModel::class => AdvModel::class,
LocationVillageEntryModel::class => VillageModel::class,
AdvsCategoriesEntryModel::class => CategoryModel::class,
AdvsAdvsEntryModel::class => AdvModel::class,
'my_form' => AdvFormBuilder::class,
];
/**
* The addon singleton bindings.
*
* @type array|null
*/
protected $singletons = [
// CfValueRepositoryInterface::class => CfValueRepository::class,
// CustomFieldAdvRepositoryInterface::class => CustomFieldAdvRepository::class,
// CustomFieldRepositoryInterface::class => CustomFieldRepository::class,
AdvRepositoryInterface::class => AdvRepository::class,
VillageRepositoryInterface::class => VillageRepository::class,
CategoryRepositoryInterface::class => CategoryRepository::class,
@ -259,14 +243,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
protected $overrides = [
'streams::form/form' => 'visiosoft.module.advs::form/form',
//'streams::errors/404' => 'module::errors/404',
//'streams::errors/500' => 'module::errors/500',
];
public function boot(AddonCollection $addonCollection, FileModel $fileModel)
{
// Run extra post-boot registration logic here.
// Use method injection or commands to bring in services.
$settings_url = [
'general_settings' => [
'title' => 'visiosoft.module.advs::button.general_settings',