mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
product options created - first commit
This commit is contained in:
parent
136d314b19
commit
0a48d09668
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$factory->define(
|
||||
Visiosoft\AdvsModule\OptionConfiguration\OptionConfigurationModel::class,
|
||||
function (Faker\Generator $faker) {
|
||||
return [
|
||||
//'title' => $faker->words(2),
|
||||
];
|
||||
}
|
||||
);
|
||||
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$factory->define(
|
||||
Visiosoft\AdvsModule\OptionsConfiguration\OptionsConfigurationModel::class,
|
||||
function (Faker\Generator $faker) {
|
||||
return [
|
||||
//'title' => $faker->words(2),
|
||||
];
|
||||
}
|
||||
);
|
||||
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$factory->define(
|
||||
Visiosoft\AdvsModule\Productoption\ProductoptionModel::class,
|
||||
function (Faker\Generator $faker) {
|
||||
return [
|
||||
//'title' => $faker->words(2),
|
||||
];
|
||||
}
|
||||
);
|
||||
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$factory->define(
|
||||
Visiosoft\AdvsModule\ProductoptionsValue\ProductoptionsValueModel::class,
|
||||
function (Faker\Generator $faker) {
|
||||
return [
|
||||
//'title' => $faker->words(2),
|
||||
];
|
||||
}
|
||||
);
|
||||
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||
use Visiosoft\AdvsModule\Adv\AdvModel;
|
||||
|
||||
class VisiosoftModuleAdvsCreateProductoptionsStream extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* This migration creates the stream.
|
||||
* It should be deleted on rollback.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $delete = true;
|
||||
|
||||
protected $fields = [
|
||||
'categories' => 'anomaly.field_type.select',
|
||||
];
|
||||
/**
|
||||
* The stream definition.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $stream = [
|
||||
'slug' => 'productoptions',
|
||||
'title_column' => 'name',
|
||||
'translatable' => true,
|
||||
'versionable' => false,
|
||||
'trashable' => true,
|
||||
'searchable' => false,
|
||||
'sortable' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* The stream assignments.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assignments = [
|
||||
'categories',
|
||||
'name' => [
|
||||
'translatable' => true,
|
||||
'required' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||
use \Visiosoft\AdvsModule\Productoption\ProductoptionModel;
|
||||
|
||||
class VisiosoftModuleAdvsCreateProductoptionsValueStream extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* This migration creates the stream.
|
||||
* It should be deleted on rollback.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $delete = true;
|
||||
|
||||
|
||||
protected $fields = [
|
||||
'product_option' => [
|
||||
'type' => 'anomaly.field_type.relationship',
|
||||
'config' => [
|
||||
'related' => ProductoptionModel::class,
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* The stream definition.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $stream = [
|
||||
'slug' => 'productoptions_value',
|
||||
'title_column' => 'name',
|
||||
'translatable' => true,
|
||||
'versionable' => false,
|
||||
'trashable' => true,
|
||||
'searchable' => false,
|
||||
'sortable' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* The stream assignments.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assignments = [
|
||||
'name' => [
|
||||
'translatable' => true,
|
||||
'required' => true,
|
||||
],
|
||||
'product_option' => [
|
||||
'required' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||
|
||||
class VisiosoftModuleAdvsAddedOptionsField extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Don't delete stream on rollback
|
||||
* because this isn't creating the
|
||||
* stream only referencing it.
|
||||
*/
|
||||
protected $delete = false;
|
||||
|
||||
/**
|
||||
* Any additional information will
|
||||
* be updated. Slug helps find
|
||||
* the stream to work with for
|
||||
* assignments that follow.
|
||||
*/
|
||||
protected $stream = [
|
||||
'slug' => 'advs',
|
||||
];
|
||||
|
||||
/**
|
||||
* The addon fields.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fields = [
|
||||
'product_options_value' => [
|
||||
'type' => 'anomaly.field_type.multiple',
|
||||
'config' => [
|
||||
'mode' => 'lookup',
|
||||
'related' => \Visiosoft\AdvsModule\ProductoptionsValue\ProductoptionsValueModel::class,
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* The field's assignment.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assignments = [
|
||||
'product_options_value',
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||
|
||||
class VisiosoftModuleAdvsCreateOptionConfigurationStream extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* This migration creates the stream.
|
||||
* It should be deleted on rollback.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $delete = true;
|
||||
|
||||
protected $fields = [
|
||||
'option_json' => 'visiosoft.field_type.json',
|
||||
];
|
||||
|
||||
/**
|
||||
* The stream definition.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $stream = [
|
||||
'slug' => 'option_configuration',
|
||||
'title_column' => 'option_json',
|
||||
'translatable' => false,
|
||||
'versionable' => false,
|
||||
'trashable' => false,
|
||||
'searchable' => false,
|
||||
'sortable' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* The stream assignments.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assignments = [
|
||||
'parent_adv' => [
|
||||
'required' => true,
|
||||
],
|
||||
'price' => [
|
||||
'required' => true,
|
||||
],
|
||||
'currency' => [
|
||||
'required' => true,
|
||||
],
|
||||
'stock' => [
|
||||
'required' => true,
|
||||
],
|
||||
'option_json' => [
|
||||
'required' => true,
|
||||
],
|
||||
];
|
||||
|
||||
}
|
||||
@ -21,4 +21,29 @@ return [
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
'productoptions' => [
|
||||
'read',
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
'productoptions_value' => [
|
||||
'read',
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
'options_configuration' => [
|
||||
'read',
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
'option_configuration' => [
|
||||
'read',
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
'option_configuration' => [
|
||||
'read',
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
];
|
||||
|
||||
@ -32,5 +32,10 @@ return [
|
||||
'name' => 'Update Category'
|
||||
],
|
||||
'new_option' => 'New Option',
|
||||
'export' => 'Export'
|
||||
'export' => 'Export',
|
||||
'new_productoption' => 'New Productoption',
|
||||
'new_productoptions_value' => 'New Productoptions value',
|
||||
'new_options_configuration' => 'New Options configuration',
|
||||
'new_option_configuration' => 'New Option configuration',
|
||||
'new_option_configuration' => 'New Option configuration',
|
||||
];
|
||||
|
||||
@ -313,4 +313,10 @@ return [
|
||||
'site' => 'Site',
|
||||
'subscription' => 'Subscription',
|
||||
'created' => 'Created',
|
||||
'product_option' => [
|
||||
'name' => 'Product Option'
|
||||
],
|
||||
'option_json' => [
|
||||
'name' => 'Option'
|
||||
]
|
||||
];
|
||||
|
||||
@ -57,4 +57,44 @@ return [
|
||||
'delete' => 'Can delete options?',
|
||||
],
|
||||
],
|
||||
'productoptions' => [
|
||||
'name' => 'Productoptions',
|
||||
'option' => [
|
||||
'read' => 'Can read productoptions?',
|
||||
'write' => 'Can create/edit productoptions?',
|
||||
'delete' => 'Can delete productoptions?',
|
||||
],
|
||||
],
|
||||
'productoptions_value' => [
|
||||
'name' => 'Productoptions value',
|
||||
'option' => [
|
||||
'read' => 'Can read productoptions value?',
|
||||
'write' => 'Can create/edit productoptions value?',
|
||||
'delete' => 'Can delete productoptions value?',
|
||||
],
|
||||
],
|
||||
'options_configuration' => [
|
||||
'name' => 'Options configuration',
|
||||
'option' => [
|
||||
'read' => 'Can read options configuration?',
|
||||
'write' => 'Can create/edit options configuration?',
|
||||
'delete' => 'Can delete options configuration?',
|
||||
],
|
||||
],
|
||||
'option_configuration' => [
|
||||
'name' => 'Option configuration',
|
||||
'option' => [
|
||||
'read' => 'Can read option configuration?',
|
||||
'write' => 'Can create/edit option configuration?',
|
||||
'delete' => 'Can delete option configuration?',
|
||||
],
|
||||
],
|
||||
'option_configuration' => [
|
||||
'name' => 'Option configuration',
|
||||
'option' => [
|
||||
'read' => 'Can read option configuration?',
|
||||
'write' => 'Can create/edit option configuration?',
|
||||
'delete' => 'Can delete option configuration?',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@ -45,4 +45,19 @@ return [
|
||||
'title' => 'Options',
|
||||
],
|
||||
'ads_image' => 'Ads Image',
|
||||
'product_options' => [
|
||||
'title' => 'Product Options',
|
||||
],
|
||||
'productoptions_value' => [
|
||||
'title' => 'Productoptions value',
|
||||
],
|
||||
'options_configuration' => [
|
||||
'title' => 'Options configuration',
|
||||
],
|
||||
'option_configuration' => [
|
||||
'title' => 'Option configuration',
|
||||
],
|
||||
'option_configuration' => [
|
||||
'title' => 'Option configuration',
|
||||
],
|
||||
];
|
||||
|
||||
@ -22,4 +22,19 @@ return [
|
||||
'options' => [
|
||||
'name' => 'Options',
|
||||
],
|
||||
'product_options' => [
|
||||
'name' => 'Produc Options',
|
||||
],
|
||||
'productoptions_value' => [
|
||||
'name' => 'Productoptions value',
|
||||
],
|
||||
'options_configuration' => [
|
||||
'name' => 'Options configuration',
|
||||
],
|
||||
'option_configuration' => [
|
||||
'name' => 'Option configuration',
|
||||
],
|
||||
'option_configuration' => [
|
||||
'name' => 'Option configuration',
|
||||
],
|
||||
];
|
||||
|
||||
@ -138,6 +138,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row form-group product-options">
|
||||
<label for="productOptions" class="col-sm-2">
|
||||
{{ trans('visiosoft.module.advs::field.product_option.name') }}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
{{ form.fields.product_options_value.input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row form-group brand-name">
|
||||
<div class="col-md-12">
|
||||
<div class="field-group advs_desc">
|
||||
|
||||
@ -377,4 +377,9 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
{
|
||||
return $this->finish_at ? $this->finish_at < Carbon::now() : true;
|
||||
}
|
||||
|
||||
public function getProductOptionsValues()
|
||||
{
|
||||
return $this->product_options_value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,4 +5,6 @@ use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
interface AdvInterface extends EntryInterface
|
||||
{
|
||||
public function expired();
|
||||
|
||||
public function getProductOptionsValues();
|
||||
}
|
||||
|
||||
@ -60,7 +60,8 @@ class AdvFormBuilder extends FormBuilder
|
||||
],
|
||||
'files',
|
||||
'popular_adv',
|
||||
'adv_day'
|
||||
'adv_day',
|
||||
'product_options_value'
|
||||
];
|
||||
|
||||
protected $category = null;
|
||||
|
||||
@ -37,9 +37,22 @@ class AdvsModule extends Module
|
||||
],
|
||||
],
|
||||
],
|
||||
'product_options' => [
|
||||
'title' => 'visiosoft.module.advs::section.product_options.title',
|
||||
'buttons' => [
|
||||
'new_productoption',
|
||||
],
|
||||
],
|
||||
'productoptions_value' => [
|
||||
'title' => 'visiosoft.module.advs::section.productoptions_value.title',
|
||||
'buttons' => [
|
||||
'new_productoptions_value',
|
||||
],
|
||||
],
|
||||
'option_configuration',
|
||||
'assets_clear' => [
|
||||
'title' => 'visiosoft.module.advs::section.assets_clear.name',
|
||||
'href' => '/admin/assets/clear',
|
||||
'title' => 'visiosoft.module.advs::section.assets_clear.name',
|
||||
'href' => '/admin/assets/clear',
|
||||
]
|
||||
// 'custom_fields' => [
|
||||
// 'buttons' => [
|
||||
|
||||
@ -15,6 +15,12 @@ use Visiosoft\AdvsModule\Http\Middleware\SetLang;
|
||||
use Visiosoft\AdvsModule\Listener\AddAdvsSettingsScript;
|
||||
use Visiosoft\AdvsModule\Option\Contract\OptionRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\Option\OptionRepository;
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\Contract\OptionConfigurationRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\OptionConfigurationRepository;
|
||||
use Visiosoft\AdvsModule\Productoption\Contract\ProductoptionRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\Productoption\ProductoptionRepository;
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\ProductoptionsValueRepository;
|
||||
use Visiosoft\LocationModule\Village\Contract\VillageRepositoryInterface;
|
||||
use Visiosoft\LocationModule\Village\VillageRepository;
|
||||
use Visiosoft\LocationModule\Village\VillageModel;
|
||||
@ -214,6 +220,16 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
||||
|
||||
// Others
|
||||
'advs/ttr/{id}' => 'Visiosoft\PackagesModule\Http\Controller\packageFEController@advsStatusbyUser',
|
||||
|
||||
//Configrations Admin Controller
|
||||
'admin/advs/option_configuration/create' => [
|
||||
'as' => 'visiosoft.module.advs::configrations.create',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\OptionConfigurationController@create',
|
||||
],
|
||||
'admin/advs/option_configuration' => [
|
||||
'as' => 'visiosoft.module.advs::configrations.index',
|
||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\OptionConfigurationController@index',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
@ -294,6 +310,9 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
||||
CategoryRepositoryInterface::class => CategoryRepository::class,
|
||||
CountryRepositoryInterface::class => CountryRepository::class,
|
||||
OptionRepositoryInterface::class => OptionRepository::class,
|
||||
ProductoptionRepositoryInterface::class => ProductoptionRepository::class,
|
||||
OptionConfigurationRepositoryInterface::class => OptionConfigurationRepository::class,
|
||||
ProductoptionsValueRepositoryInterface::class => ProductoptionsValueRepository::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@ -108,6 +108,10 @@ class AdvsController extends AdminController
|
||||
'replicate' => [
|
||||
'text' => 'Replicate',
|
||||
],
|
||||
'create_configration' => [
|
||||
'text' => 'Create Configrations',
|
||||
'href' => route('visiosoft.module.advs::configrations.create')."?ad={entry.id}"
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Http\Controller\Admin;
|
||||
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\Form\OptionConfigurationFormBuilder;
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\Table\OptionConfigurationTableBuilder;
|
||||
use Anomaly\Streams\Platform\Http\Controller\AdminController;
|
||||
|
||||
class OptionConfigurationController extends AdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* Display an index of existing entries.
|
||||
*
|
||||
* @param OptionConfigurationTableBuilder $table
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function index(OptionConfigurationTableBuilder $table)
|
||||
{
|
||||
return $table->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new entry.
|
||||
*
|
||||
* @param OptionConfigurationFormBuilder $form
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function create(OptionConfigurationFormBuilder $form)
|
||||
{
|
||||
$form->setOption('redirect', route('visiosoft.module.advs::configrations.index'));
|
||||
return $form->render();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Http\Controller\Admin;
|
||||
|
||||
use Visiosoft\AdvsModule\Productoption\Form\ProductoptionFormBuilder;
|
||||
use Visiosoft\AdvsModule\Productoption\Table\ProductoptionTableBuilder;
|
||||
use Anomaly\Streams\Platform\Http\Controller\AdminController;
|
||||
|
||||
class ProductoptionsController extends AdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* Display an index of existing entries.
|
||||
*
|
||||
* @param ProductoptionTableBuilder $table
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function index(ProductoptionTableBuilder $table)
|
||||
{
|
||||
return $table->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new entry.
|
||||
*
|
||||
* @param ProductoptionFormBuilder $form
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function create(ProductoptionFormBuilder $form)
|
||||
{
|
||||
return $form->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit an existing entry.
|
||||
*
|
||||
* @param ProductoptionFormBuilder $form
|
||||
* @param $id
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function edit(ProductoptionFormBuilder $form, $id)
|
||||
{
|
||||
return $form->render($id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Http\Controller\Admin;
|
||||
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\Form\ProductoptionsValueFormBuilder;
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\Table\ProductoptionsValueTableBuilder;
|
||||
use Anomaly\Streams\Platform\Http\Controller\AdminController;
|
||||
|
||||
class ProductoptionsValueController extends AdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* Display an index of existing entries.
|
||||
*
|
||||
* @param ProductoptionsValueTableBuilder $table
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function index(ProductoptionsValueTableBuilder $table)
|
||||
{
|
||||
return $table->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new entry.
|
||||
*
|
||||
* @param ProductoptionsValueFormBuilder $form
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function create(ProductoptionsValueFormBuilder $form)
|
||||
{
|
||||
return $form->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit an existing entry.
|
||||
*
|
||||
* @param ProductoptionsValueFormBuilder $form
|
||||
* @param $id
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function edit(ProductoptionsValueFormBuilder $form, $id)
|
||||
{
|
||||
return $form->render($id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
|
||||
interface OptionConfigurationInterface extends EntryInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryRepositoryInterface;
|
||||
|
||||
interface OptionConfigurationRepositoryInterface extends EntryRepositoryInterface
|
||||
{
|
||||
public function createConfigration($ad_id,$price,$currency,$stock,$option_json);
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Form;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
|
||||
class OptionConfigurationFormBuilder extends FormBuilder
|
||||
{
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Form;
|
||||
|
||||
use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\Productoption\Contract\ProductoptionRepositoryInterface;
|
||||
|
||||
class OptionConfigurationFormFields
|
||||
{
|
||||
public function handle(
|
||||
OptionConfigurationFormBuilder $builder,
|
||||
AdvRepositoryInterface $advRepository,
|
||||
ProductoptionRepositoryInterface $productOptionRepository)
|
||||
{
|
||||
if(request()->has('ad'))
|
||||
{
|
||||
$ad = $advRepository->find(request('ad'));
|
||||
|
||||
$options = $ad->getProductOptionsValues()->groupBy('product_option_id');
|
||||
|
||||
$options_fields = array();
|
||||
|
||||
foreach ($options as $option_id => $option_values)
|
||||
{
|
||||
if($option = $productOptionRepository->find($option_id))
|
||||
{
|
||||
$options_fields['option-'.$option->getId()] = [
|
||||
'type' => 'anomaly.field_type.select',
|
||||
'label' => $option->getName(),
|
||||
'required' => true,
|
||||
'config' => [
|
||||
'options' => $option_values->pluck('name','id')->all(),
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
$fields = array_merge($options_fields, ['price', 'currency', 'stock']);
|
||||
|
||||
$builder->setFields($fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Form;
|
||||
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\Contract\OptionConfigurationRepositoryInterface;
|
||||
|
||||
class OptionConfigurationFormHandler
|
||||
{
|
||||
public function handle(
|
||||
OptionConfigurationFormBuilder $builder,
|
||||
OptionConfigurationRepositoryInterface $repository
|
||||
)
|
||||
{
|
||||
if (!$builder->canSave()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$parameters = $builder->getPostData();
|
||||
$parameters['parent_adv_id'] = request()->get('ad');
|
||||
|
||||
$option_json = array();
|
||||
|
||||
foreach ($parameters as $key => $parameter_value) {
|
||||
if (substr($key, 0, 7) === "option-") {
|
||||
$option_id = substr($key, 7);
|
||||
$option_json[$option_id] = $parameter_value;
|
||||
unset($parameters[$key]);
|
||||
}
|
||||
}
|
||||
$option_json = ['option_json' => json_encode($option_json)];
|
||||
$configration = array_merge($parameters, $option_json);
|
||||
|
||||
|
||||
$entry = $repository->create($configration);
|
||||
$builder->setFormEntry($entry);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCollection;
|
||||
|
||||
class OptionConfigurationCollection extends EntryCollection
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCriteria;
|
||||
|
||||
class OptionConfigurationCriteria extends EntryCriteria
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration;
|
||||
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\Contract\OptionConfigurationInterface;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsOptionConfigurationEntryModel;
|
||||
|
||||
class OptionConfigurationModel extends AdvsOptionConfigurationEntryModel implements OptionConfigurationInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryObserver;
|
||||
|
||||
class OptionConfigurationObserver extends EntryObserver
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryPresenter;
|
||||
|
||||
class OptionConfigurationPresenter extends EntryPresenter
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration;
|
||||
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\Contract\OptionConfigurationRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Entry\EntryRepository;
|
||||
|
||||
class OptionConfigurationRepository extends EntryRepository implements OptionConfigurationRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* The entry model.
|
||||
*
|
||||
* @var OptionConfigurationModel
|
||||
*/
|
||||
protected $model;
|
||||
|
||||
/**
|
||||
* Create a new OptionConfigurationRepository instance.
|
||||
*
|
||||
* @param OptionConfigurationModel $model
|
||||
*/
|
||||
public function __construct(OptionConfigurationModel $model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
|
||||
public function createConfigration($ad_id,$price,$currency,$stock,$option_json)
|
||||
{
|
||||
return $this->create([
|
||||
'parent_adv_id' => $ad_id,
|
||||
'price' => $price,
|
||||
'currency' => $currency,
|
||||
'stock' => $stock,
|
||||
'option_json' => $option_json,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryRouter;
|
||||
|
||||
class OptionConfigurationRouter extends EntryRouter
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration;
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||
|
||||
class OptionConfigurationSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the seeder.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Table;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
|
||||
|
||||
class OptionConfigurationTableBuilder extends TableBuilder
|
||||
{
|
||||
protected $actions = [
|
||||
'delete'
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Table;
|
||||
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryModel;
|
||||
use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\Contract\OptionConfigurationRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\Productoption\Contract\ProductoptionRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueRepositoryInterface;
|
||||
|
||||
class OptionConfigurationTableColumns
|
||||
{
|
||||
public function handle(
|
||||
OptionConfigurationTableBuilder $builder
|
||||
)
|
||||
{
|
||||
$builder->setColumns([
|
||||
'name' => [
|
||||
'value' => function (EntryModel $entry,
|
||||
AdvRepositoryInterface $advRepository) {
|
||||
|
||||
$adv = $advRepository->findById($entry->parent_adv_id);
|
||||
return "<span><a href='" . route('adv_detail', [$entry->parent_adv_id]) ."'>$adv->name</a></span>";
|
||||
}
|
||||
],
|
||||
'option_json' => [
|
||||
'value' => function (EntryModel $entry,
|
||||
ProductoptionRepositoryInterface $productOptionRepository,
|
||||
ProductoptionsValueRepositoryInterface $productOptionsValueRepository) {
|
||||
|
||||
$values = json_decode($entry->option_json);
|
||||
$text = "";
|
||||
|
||||
foreach ($values as $key => $value) {
|
||||
$productOption = $productOptionRepository->findBy('entry_id', $key);
|
||||
$productOptionsValue = $productOptionsValueRepository->findBy('entry_id', $value);
|
||||
|
||||
$text .=
|
||||
'<span class="tag tag-sm tag-info mr-1">'.
|
||||
$productOption->name . ': ' . $productOptionsValue->name.
|
||||
'</span>';
|
||||
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
|
||||
interface ProductoptionInterface extends EntryInterface
|
||||
{
|
||||
public function getName();
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryRepositoryInterface;
|
||||
|
||||
interface ProductoptionRepositoryInterface extends EntryRepositoryInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption\Form;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
use Visiosoft\CatsModule\Category\CategoryModel;
|
||||
use Visiosoft\CatsModule\Category\CategoryRepository;
|
||||
|
||||
class ProductoptionFormBuilder 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 = [];
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCollection;
|
||||
|
||||
class ProductoptionCollection extends EntryCollection
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCriteria;
|
||||
|
||||
class ProductoptionCriteria extends EntryCriteria
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption;
|
||||
|
||||
use Visiosoft\AdvsModule\Productoption\Contract\ProductoptionInterface;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsProductoptionsEntryModel;
|
||||
|
||||
class ProductoptionModel extends AdvsProductoptionsEntryModel implements ProductoptionInterface
|
||||
{
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryObserver;
|
||||
|
||||
class ProductoptionObserver extends EntryObserver
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryPresenter;
|
||||
|
||||
class ProductoptionPresenter extends EntryPresenter
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption;
|
||||
|
||||
use Visiosoft\AdvsModule\Productoption\Contract\ProductoptionRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Entry\EntryRepository;
|
||||
|
||||
class ProductoptionRepository extends EntryRepository implements ProductoptionRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* The entry model.
|
||||
*
|
||||
* @var ProductoptionModel
|
||||
*/
|
||||
protected $model;
|
||||
|
||||
/**
|
||||
* Create a new ProductoptionRepository instance.
|
||||
*
|
||||
* @param ProductoptionModel $model
|
||||
*/
|
||||
public function __construct(ProductoptionModel $model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryRouter;
|
||||
|
||||
class ProductoptionRouter extends EntryRouter
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption;
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||
|
||||
class ProductoptionSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the seeder.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Productoption\Table;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
|
||||
|
||||
class ProductoptionTableBuilder 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 = [];
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
|
||||
interface ProductoptionsValueInterface extends EntryInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryRepositoryInterface;
|
||||
|
||||
interface ProductoptionsValueRepositoryInterface extends EntryRepositoryInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue\Form;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
|
||||
class ProductoptionsValueFormBuilder extends FormBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The form fields.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $fields = [
|
||||
'product_option','name'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 = [];
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCollection;
|
||||
|
||||
class ProductoptionsValueCollection extends EntryCollection
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCriteria;
|
||||
|
||||
class ProductoptionsValueCriteria extends EntryCriteria
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue;
|
||||
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueInterface;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsProductoptionsValueEntryModel;
|
||||
|
||||
class ProductoptionsValueModel extends AdvsProductoptionsValueEntryModel implements ProductoptionsValueInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryObserver;
|
||||
|
||||
class ProductoptionsValueObserver extends EntryObserver
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryPresenter;
|
||||
|
||||
class ProductoptionsValuePresenter extends EntryPresenter
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue;
|
||||
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Entry\EntryRepository;
|
||||
|
||||
class ProductoptionsValueRepository extends EntryRepository implements ProductoptionsValueRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* The entry model.
|
||||
*
|
||||
* @var ProductoptionsValueModel
|
||||
*/
|
||||
protected $model;
|
||||
|
||||
/**
|
||||
* Create a new ProductoptionsValueRepository instance.
|
||||
*
|
||||
* @param ProductoptionsValueModel $model
|
||||
*/
|
||||
public function __construct(ProductoptionsValueModel $model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryRouter;
|
||||
|
||||
class ProductoptionsValueRouter extends EntryRouter
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue;
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||
|
||||
class ProductoptionsValueSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the seeder.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue\Support\MultipleFieldType;
|
||||
|
||||
/**
|
||||
* Class LookupTableBuilder
|
||||
*
|
||||
* @link http://pyrocms.com/
|
||||
* @author PyroCMS, Inc. <support@pyrocms.com>
|
||||
* @author Ryan Thompson <ryan@pyrocms.com>
|
||||
*/
|
||||
class LookupTableBuilder extends \Anomaly\MultipleFieldType\Table\LookupTableBuilder
|
||||
{
|
||||
|
||||
protected $filters = [
|
||||
'product_option'
|
||||
];
|
||||
|
||||
/**
|
||||
* The table columns.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $columns = [
|
||||
'name', 'product_option'
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue\Support\MultipleFieldType;
|
||||
|
||||
/**
|
||||
* Class SelectedTableBuilder
|
||||
*
|
||||
* @link http://pyrocms.com/
|
||||
* @author PyroCMS, Inc. <support@pyrocms.com>
|
||||
* @author Ryan Thompson <ryan@pyrocms.com>
|
||||
*/
|
||||
class SelectedTableBuilder extends \Anomaly\MultipleFieldType\Table\SelectedTableBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The table columns.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $columns = [
|
||||
'name', 'product_option'
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue\Support\MultipleFieldType;
|
||||
|
||||
/**
|
||||
* Class ValueTableBuilder
|
||||
*
|
||||
* @link http://pyrocms.com/
|
||||
* @author PyroCMS, Inc. <support@pyrocms.com>
|
||||
* @author Ryan Thompson <ryan@pyrocms.com>
|
||||
*/
|
||||
class ValueTableBuilder extends \Anomaly\MultipleFieldType\Table\ValueTableBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The table columns.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $columns = [
|
||||
'name', 'product_option'
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue\Table;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
|
||||
|
||||
class ProductoptionsValueTableBuilder extends TableBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The table views.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $views = [];
|
||||
|
||||
/**
|
||||
* The table filters.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $filters = [
|
||||
'name', 'product_option'
|
||||
];
|
||||
|
||||
/**
|
||||
* The table columns.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $columns = [
|
||||
'title' => [
|
||||
'value' => 'entry.name'
|
||||
],
|
||||
'product_option',
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 = [];
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationFormBuilderTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationCollectionTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationCriteriaTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationModelTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationObserverTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationPresenterTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationRepositoryTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationRouterTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationSeederTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
|
||||
|
||||
class OptionConfigurationTableBuilderTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationFormBuilderTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationCollectionTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationCriteriaTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationModelTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationObserverTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationPresenterTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationRepositoryTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationRouterTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationSeederTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
|
||||
|
||||
class OptionsConfigurationTableBuilderTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionFormBuilderTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionCollectionTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionCriteriaTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionModelTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionObserverTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionPresenterTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionRepositoryTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionRouterTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionSeederTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
|
||||
|
||||
class ProductoptionTableBuilderTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\ProductoptionsValue;
|
||||
|
||||
class ProductoptionsValueFormBuilderTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\ProductoptionsValue;
|
||||
|
||||
class ProductoptionsValueCollectionTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\ProductoptionsValue;
|
||||
|
||||
class ProductoptionsValueCriteriaTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Visiosoft\AdvsModule\Test\Unit\ProductoptionsValue;
|
||||
|
||||
class ProductoptionsValueModelTest extends \TestCase
|
||||
{
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user