add option model to commit

This commit is contained in:
Diatrex 2020-06-09 16:44:27 +03:00
parent 05a44d52d1
commit 4a744c89d7
13 changed files with 275 additions and 0 deletions

View File

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

View File

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

View File

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

View File

@ -0,0 +1,66 @@
<?php namespace Visiosoft\AdvsModule\Option\Form;
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class OptionFormBuilder 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\Option;
use Anomaly\Streams\Platform\Entry\EntryCollection;
class OptionCollection extends EntryCollection
{
}

View File

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

View File

@ -0,0 +1,9 @@
<?php namespace Visiosoft\AdvsModule\Option;
use Visiosoft\AdvsModule\Option\Contract\OptionInterface;
use Anomaly\Streams\Platform\Model\Advs\AdvsOptionsEntryModel;
class OptionModel extends AdvsOptionsEntryModel implements OptionInterface
{
}

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,15 @@
<?php namespace Visiosoft\AdvsModule\Option;
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
class OptionSeeder extends Seeder
{
/**
* Run the seeder.
*/
public function run()
{
//
}
}

View File

@ -0,0 +1,61 @@
<?php namespace Visiosoft\AdvsModule\Option\Table;
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
class OptionTableBuilder 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 = [];
}