product options created - first commit

This commit is contained in:
Muammer Top 2020-10-19 18:34:53 +03:00
parent 136d314b19
commit 0a48d09668
106 changed files with 1652 additions and 4 deletions

View File

@ -0,0 +1,10 @@
<?php
$factory->define(
Visiosoft\AdvsModule\OptionConfiguration\OptionConfigurationModel::class,
function (Faker\Generator $faker) {
return [
//'title' => $faker->words(2),
];
}
);

View File

@ -0,0 +1,10 @@
<?php
$factory->define(
Visiosoft\AdvsModule\OptionsConfiguration\OptionsConfigurationModel::class,
function (Faker\Generator $faker) {
return [
//'title' => $faker->words(2),
];
}
);

View File

@ -0,0 +1,10 @@
<?php
$factory->define(
Visiosoft\AdvsModule\Productoption\ProductoptionModel::class,
function (Faker\Generator $faker) {
return [
//'title' => $faker->words(2),
];
}
);

View File

@ -0,0 +1,10 @@
<?php
$factory->define(
Visiosoft\AdvsModule\ProductoptionsValue\ProductoptionsValueModel::class,
function (Faker\Generator $faker) {
return [
//'title' => $faker->words(2),
];
}
);

View File

@ -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,
],
];
}

View File

@ -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,
],
];
}

View File

@ -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',
];
}

View File

@ -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,
],
];
}

View File

@ -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',
],
];

View File

@ -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',
];

View File

@ -313,4 +313,10 @@ return [
'site' => 'Site',
'subscription' => 'Subscription',
'created' => 'Created',
'product_option' => [
'name' => 'Product Option'
],
'option_json' => [
'name' => 'Option'
]
];

View File

@ -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?',
],
],
];

View File

@ -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',
],
];

View File

@ -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',
],
];

View File

@ -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">

View File

@ -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;
}
}

View File

@ -5,4 +5,6 @@ use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
interface AdvInterface extends EntryInterface
{
public function expired();
public function getProductOptionsValues();
}

View File

@ -60,7 +60,8 @@ class AdvFormBuilder extends FormBuilder
],
'files',
'popular_adv',
'adv_day'
'adv_day',
'product_options_value'
];
protected $category = null;

View File

@ -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' => [

View File

@ -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,
];
/**

View File

@ -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}"
],
],
],
]);

View File

@ -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();
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

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

View File

@ -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);
}

View File

@ -0,0 +1,7 @@
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Form;
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class OptionConfigurationFormBuilder extends FormBuilder
{
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}

View File

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

View File

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

View File

@ -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
{
}

View File

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

View File

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

View File

@ -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,
]);
}
}

View File

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

View File

@ -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()
{
//
}
}

View File

@ -0,0 +1,10 @@
<?php namespace Visiosoft\AdvsModule\OptionConfiguration\Table;
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
class OptionConfigurationTableBuilder extends TableBuilder
{
protected $actions = [
'delete'
];
}

View File

@ -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;
}
],
]);
}
}

View File

@ -0,0 +1,8 @@
<?php namespace Visiosoft\AdvsModule\Productoption\Contract;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
interface ProductoptionInterface extends EntryInterface
{
public function getName();
}

View File

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

View File

@ -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 = [];
}

View File

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

View File

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

View File

@ -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;
}
}

View File

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

View File

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

View File

@ -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;
}
}

View File

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

View File

@ -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()
{
//
}
}

View File

@ -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 = [];
}

View File

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

View File

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

View File

@ -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 = [];
}

View File

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

View File

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

View File

@ -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
{
}

View File

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

View File

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

View File

@ -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;
}
}

View File

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

View File

@ -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()
{
//
}
}

View File

@ -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'
];
}

View File

@ -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'
];
}

View File

@ -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'
];
}

View File

@ -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 = [];
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationFormBuilderTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationCollectionTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationCriteriaTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationModelTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationObserverTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationPresenterTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationRepositoryTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationRouterTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationSeederTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionConfiguration;
class OptionConfigurationTableBuilderTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationFormBuilderTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationCollectionTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationCriteriaTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationModelTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationObserverTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationPresenterTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationRepositoryTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationRouterTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationSeederTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\OptionsConfiguration;
class OptionsConfigurationTableBuilderTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionFormBuilderTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionCollectionTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionCriteriaTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionModelTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionObserverTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionPresenterTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionRepositoryTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionRouterTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionSeederTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\Productoption;
class ProductoptionTableBuilderTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\ProductoptionsValue;
class ProductoptionsValueFormBuilderTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\ProductoptionsValue;
class ProductoptionsValueCollectionTest extends \TestCase
{
}

View File

@ -0,0 +1,8 @@
<?php
namespace Visiosoft\AdvsModule\Test\Unit\ProductoptionsValue;
class ProductoptionsValueCriteriaTest extends \TestCase
{
}

View File

@ -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