#3283 remove placeholder on category

This commit is contained in:
Muammer Top 2021-03-09 12:05:23 +03:00
parent dc95b6b8c3
commit ad827b1481
16 changed files with 1 additions and 330 deletions

View File

@ -30,11 +30,6 @@ class CatsModule extends Module
'new_category',
],
],
'placeholderforsearch' => [
'buttons' => [
'new_placeholderforsearch',
],
],
];
}

View File

@ -1,7 +1,6 @@
<?php namespace Visiosoft\CatsModule;
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
use Visiosoft\CatsModule\Placeholderforsearch\PlaceholderforsearchSeeder;
class CatsModuleSeeder extends Seeder
{
@ -10,6 +9,6 @@ class CatsModuleSeeder extends Seeder
*/
public function run()
{
$this->call(PlaceholderforsearchSeeder::class);
//
}
}

View File

@ -1,10 +1,6 @@
<?php namespace Visiosoft\CatsModule;
use Anomaly\Streams\Platform\Addon\AddonServiceProvider;
use Visiosoft\CatsModule\Placeholderforsearch\Contract\PlaceholderforsearchRepositoryInterface;
use Visiosoft\CatsModule\Placeholderforsearch\PlaceholderforsearchRepository;
use Anomaly\Streams\Platform\Model\Cats\CatsPlaceholderforsearchEntryModel;
use Visiosoft\CatsModule\Placeholderforsearch\PlaceholderforsearchModel;
use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface;
use Visiosoft\CatsModule\Category\CategoryRepository;
use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
@ -51,9 +47,6 @@ class CatsModuleServiceProvider extends AddonServiceProvider
*/
protected $routes = [
'admin/cats/clean_subcats' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@cleanSubcats',
'admin/cats/placeholderforsearch' => 'Visiosoft\CatsModule\Http\Controller\Admin\PlaceholderforsearchController@index',
'admin/cats/placeholderforsearch/create' => 'Visiosoft\CatsModule\Http\Controller\Admin\PlaceholderforsearchController@create',
'admin/cats/placeholderforsearch/edit/{id}' => 'Visiosoft\CatsModule\Http\Controller\Admin\PlaceholderforsearchController@edit',
'admin/cats' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@index',
'admin/cats/create' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@create',
'admin/cats/edit/{id}' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@edit',
@ -117,7 +110,6 @@ class CatsModuleServiceProvider extends AddonServiceProvider
* @type array|null
*/
protected $bindings = [
CatsPlaceholderforsearchEntryModel::class => PlaceholderforsearchModel::class,
CatsCategoryEntryModel::class => CategoryModel::class,
];
@ -127,7 +119,6 @@ class CatsModuleServiceProvider extends AddonServiceProvider
* @type array|null
*/
protected $singletons = [
PlaceholderforsearchRepositoryInterface::class => PlaceholderforsearchRepository::class,
CategoryRepositoryInterface::class => CategoryRepository::class,
];
@ -203,11 +194,6 @@ class CatsModuleServiceProvider extends AddonServiceProvider
],
],
],
'placeholderforsearch' => [
'buttons' => [
'new_placeholderforsearch',
],
],
];
$this->addon->setSections($sections);
}

View File

@ -1,43 +0,0 @@
<?php namespace Visiosoft\CatsModule\Http\Controller\Admin;
use Visiosoft\CatsModule\Placeholderforsearch\Form\PlaceholderforsearchFormBuilder;
use Visiosoft\CatsModule\Placeholderforsearch\Table\PlaceholderforsearchTableBuilder;
use Anomaly\Streams\Platform\Http\Controller\AdminController;
class PlaceholderforsearchController extends AdminController
{
/**
* Display an index of existing entries.
*
* @param PlaceholderforsearchTableBuilder $table
* @return \Symfony\Component\HttpFoundation\Response
*/
public function index(PlaceholderforsearchTableBuilder $table)
{
return $table->render();
}
/**
* Create a new entry.
*
* @param PlaceholderforsearchFormBuilder $form
* @return \Symfony\Component\HttpFoundation\Response
*/
public function create(PlaceholderforsearchFormBuilder $form)
{
return $form->render();
}
/**
* Edit an existing entry.
*
* @param PlaceholderforsearchFormBuilder $form
* @param $id
* @return \Symfony\Component\HttpFoundation\Response
*/
public function edit(PlaceholderforsearchFormBuilder $form, $id)
{
return $form->render($id);
}
}

View File

@ -1,8 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch\Contract;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
interface PlaceholderforsearchInterface extends EntryInterface
{
}

View File

@ -1,8 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch\Contract;
use Anomaly\Streams\Platform\Entry\Contract\EntryRepositoryInterface;
interface PlaceholderforsearchRepositoryInterface extends EntryRepositoryInterface
{
}

View File

@ -1,66 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch\Form;
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class PlaceholderforsearchFormBuilder extends FormBuilder
{
/**
* The form fields.
*
* @var array|string
*/
protected $fields = [];
/**
* 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 = [];
}

View File

@ -1,8 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch;
use Anomaly\Streams\Platform\Entry\EntryCollection;
class PlaceholderforsearchCollection extends EntryCollection
{
}

View File

@ -1,8 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch;
use Anomaly\Streams\Platform\Entry\EntryCriteria;
class PlaceholderforsearchCriteria extends EntryCriteria
{
}

View File

@ -1,9 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch;
use Visiosoft\CatsModule\Placeholderforsearch\Contract\PlaceholderforsearchInterface;
use Anomaly\Streams\Platform\Model\Cats\CatsPlaceholderforsearchEntryModel;
class PlaceholderforsearchModel extends CatsPlaceholderforsearchEntryModel implements PlaceholderforsearchInterface
{
}

View File

@ -1,8 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch;
use Anomaly\Streams\Platform\Entry\EntryObserver;
class PlaceholderforsearchObserver extends EntryObserver
{
}

View File

@ -1,8 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch;
use Anomaly\Streams\Platform\Entry\EntryPresenter;
class PlaceholderforsearchPresenter extends EntryPresenter
{
}

View File

@ -1,25 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch;
use Visiosoft\CatsModule\Placeholderforsearch\Contract\PlaceholderforsearchRepositoryInterface;
use Anomaly\Streams\Platform\Entry\EntryRepository;
class PlaceholderforsearchRepository extends EntryRepository implements PlaceholderforsearchRepositoryInterface
{
/**
* The entry model.
*
* @var PlaceholderforsearchModel
*/
protected $model;
/**
* Create a new PlaceholderforsearchRepository instance.
*
* @param PlaceholderforsearchModel $model
*/
public function __construct(PlaceholderforsearchModel $model)
{
$this->model = $model;
}
}

View File

@ -1,8 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch;
use Anomaly\Streams\Platform\Entry\EntryRouter;
class PlaceholderforsearchRouter extends EntryRouter
{
}

View File

@ -1,49 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch;
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
use Illuminate\Support\Facades\DB;
class PlaceholderforsearchSeeder extends Seeder
{
/**
* Run the seeder.
*/
public function run()
{
DB::table('cats_placeholderforsearch')->truncate();
DB::table('cats_placeholderforsearch_translations')->truncate();
PlaceholderforsearchModel::create([
'en' => [
'name' => 'Chevrolet Camaro'
],
'tr' => [
'name' => 'Chevrolet Camaro'
]
]);
PlaceholderforsearchModel::create([
'en' => [
'name' => 'Xiaomi Black Shark 128 GB'
],
'tr' => [
'name' => 'Xiaomi Black Shark 128 GB'
]
]);
PlaceholderforsearchModel::create([
'en' => [
'name' => 'Apple MacBook Pro'
],
'tr' => [
'name' => 'Apple MacBook Pro'
]
]);
PlaceholderforsearchModel::create([
'en' => [
'name' => 'Make your search now'
],
'tr' => [
'name' => 'Make your search now'
]
]);
}
}

View File

@ -1,61 +0,0 @@
<?php namespace Visiosoft\CatsModule\Placeholderforsearch\Table;
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
class PlaceholderforsearchTableBuilder extends TableBuilder
{
/**
* The table views.
*
* @var array|string
*/
protected $views = [];
/**
* The table filters.
*
* @var array|string
*/
protected $filters = [];
/**
* The table columns.
*
* @var array|string
*/
protected $columns = [];
/**
* The table buttons.
*
* @var array|string
*/
protected $buttons = [
'edit'
];
/**
* The table actions.
*
* @var array|string
*/
protected $actions = [
'delete'
];
/**
* The table options.
*
* @var array
*/
protected $options = [];
/**
* The table assets.
*
* @var array
*/
protected $assets = [];
}