mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#3025 Making the announcement status flexible.
This commit is contained in:
parent
c800657465
commit
b802be85d4
@ -0,0 +1,43 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Http\Controller\Admin;
|
||||
|
||||
use Visiosoft\AdvsModule\Status\Form\StatusFormBuilder;
|
||||
use Visiosoft\AdvsModule\Status\Table\StatusTableBuilder;
|
||||
use Anomaly\Streams\Platform\Http\Controller\AdminController;
|
||||
|
||||
class StatusController extends AdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* Display an index of existing entries.
|
||||
*
|
||||
* @param StatusTableBuilder $table
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function index(StatusTableBuilder $table)
|
||||
{
|
||||
return $table->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new entry.
|
||||
*
|
||||
* @param StatusFormBuilder $form
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function create(StatusFormBuilder $form)
|
||||
{
|
||||
return $form->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit an existing entry.
|
||||
*
|
||||
* @param StatusFormBuilder $form
|
||||
* @param $id
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function edit(StatusFormBuilder $form, $id)
|
||||
{
|
||||
return $form->render($id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
|
||||
interface StatusInterface extends EntryInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status\Contract;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryRepositoryInterface;
|
||||
|
||||
interface StatusRepositoryInterface extends EntryRepositoryInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status\Form;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
|
||||
class StatusFormBuilder 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\Status;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCollection;
|
||||
|
||||
class StatusCollection extends EntryCollection
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryCriteria;
|
||||
|
||||
class StatusCriteria extends EntryCriteria
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status;
|
||||
|
||||
use Visiosoft\AdvsModule\Status\Contract\StatusInterface;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsStatusEntryModel;
|
||||
|
||||
class StatusModel extends AdvsStatusEntryModel implements StatusInterface
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryObserver;
|
||||
|
||||
class StatusObserver extends EntryObserver
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryPresenter;
|
||||
|
||||
class StatusPresenter extends EntryPresenter
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status;
|
||||
|
||||
use Visiosoft\AdvsModule\Status\Contract\StatusRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Entry\EntryRepository;
|
||||
|
||||
class StatusRepository extends EntryRepository implements StatusRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* The entry model.
|
||||
*
|
||||
* @var StatusModel
|
||||
*/
|
||||
protected $model;
|
||||
|
||||
/**
|
||||
* Create a new StatusRepository instance.
|
||||
*
|
||||
* @param StatusModel $model
|
||||
*/
|
||||
public function __construct(StatusModel $model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status;
|
||||
|
||||
use Anomaly\Streams\Platform\Entry\EntryRouter;
|
||||
|
||||
class StatusRouter extends EntryRouter
|
||||
{
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status;
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||
|
||||
class StatusSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the seeder.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Status\Table;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
|
||||
|
||||
class StatusTableBuilder 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 = [
|
||||
'name',
|
||||
];
|
||||
|
||||
/**
|
||||
* 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