mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
add option model to commit
This commit is contained in:
parent
05a44d52d1
commit
4a744c89d7
@ -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);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Option\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
|
||||
interface OptionInterface extends EntryInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Option\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryRepositoryInterface;
|
||||
|
||||
interface OptionRepositoryInterface extends EntryRepositoryInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -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 = [];
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Option;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCollection;
|
||||
|
||||
class OptionCollection extends EntryCollection
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Option;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCriteria;
|
||||
|
||||
class OptionCriteria extends EntryCriteria
|
||||
{
|
||||
|
||||
}
|
||||
@ -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
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Option;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryObserver;
|
||||
|
||||
class OptionObserver extends EntryObserver
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Option;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryPresenter;
|
||||
|
||||
class OptionPresenter extends EntryPresenter
|
||||
{
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Option;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryRouter;
|
||||
|
||||
class OptionRouter extends EntryRouter
|
||||
{
|
||||
|
||||
}
|
||||
@ -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()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@ -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 = [];
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user