mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-04-16 02:06:23 +02:00
Renamed function
This commit is contained in:
parent
6347308672
commit
5d4592e27c
@ -19,7 +19,7 @@ abstract class AbstractAction extends AbstractActionConstructor implements Actio
|
|||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
abstract protected function isValidByForm(): bool;
|
abstract protected function isValid(): bool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the routine.
|
* Process the routine.
|
||||||
@ -38,7 +38,7 @@ abstract class AbstractAction extends AbstractActionConstructor implements Actio
|
|||||||
final public function execute()
|
final public function execute()
|
||||||
{
|
{
|
||||||
if ($this->isSecure()) {
|
if ($this->isSecure()) {
|
||||||
if ($this->isValidByForm()) {
|
if ($this->isValid()) {
|
||||||
return $this->proccess();
|
return $this->proccess();
|
||||||
}
|
}
|
||||||
throw new NotValidByFormException('The requested Entity is not valid!');
|
throw new NotValidByFormException('The requested Entity is not valid!');
|
||||||
|
@ -37,9 +37,9 @@ final class CreateSourceAction extends AbstractCreateAction
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see \App\Domain\ActionManagement\AbstractAction::isValidByForm()
|
* @see \App\Domain\ActionManagement\AbstractAction::isValid()
|
||||||
*/
|
*/
|
||||||
protected function isValidByForm(): bool
|
protected function isValid(): bool
|
||||||
{
|
{
|
||||||
return $this->actionService->getCurrentFormBuilder()->getForm()->isValid();
|
return $this->actionService->getCurrentFormBuilder()->getForm()->isValid();
|
||||||
}
|
}
|
||||||
|
@ -24,9 +24,9 @@ final class DeleteAction extends AbstractAction
|
|||||||
* @todo Implement!
|
* @todo Implement!
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see \App\Domain\ActionManagement\AbstractAction::isValidByForm()
|
* @see \App\Domain\ActionManagement\AbstractAction::isValid()
|
||||||
*/
|
*/
|
||||||
protected function isValidByForm(): bool
|
protected function isValid(): bool
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -23,9 +23,9 @@ final class ReadAction extends AbstractAction implements ReadActionInterface
|
|||||||
* @todo Implement!
|
* @todo Implement!
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see \App\Domain\ActionManagement\AbstractAction::isValidByForm()
|
* @see \App\Domain\ActionManagement\AbstractAction::isValid()
|
||||||
*/
|
*/
|
||||||
protected function isValidByForm(): bool
|
protected function isValid(): bool
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -16,10 +16,20 @@ final class ThreadSourceAction extends AbstractThreadAction
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function isValidByForm(): bool
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @see \App\Domain\ActionManagement\AbstractAction::isValid()
|
||||||
|
*/
|
||||||
|
protected function isValid(): bool
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @see \App\Domain\ActionManagement\AbstractAction::proccess()
|
||||||
|
*/
|
||||||
protected function proccess()
|
protected function proccess()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -7,14 +7,29 @@ namespace App\Domain\ActionManagement\Update;
|
|||||||
*/
|
*/
|
||||||
final class UpdateSourceAction extends AbstractUpdateAction
|
final class UpdateSourceAction extends AbstractUpdateAction
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @see \App\Domain\ActionManagement\AbstractAction::isSecure()
|
||||||
|
*/
|
||||||
protected function isSecure(): bool
|
protected function isSecure(): bool
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function isValidByForm(): bool
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @see \App\Domain\ActionManagement\AbstractAction::isValid()
|
||||||
|
*/
|
||||||
|
protected function isValid(): bool
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @see \App\Domain\ActionManagement\AbstractAction::proccess()
|
||||||
|
*/
|
||||||
protected function proccess()
|
protected function proccess()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ namespace App\Domain\FormManagement;
|
|||||||
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use App\Domain\RequestManagement\Action\RequestedActionServiceInterface;
|
use App\Domain\RequestManagement\Action\RequestedActionServiceInterface;
|
||||||
use FOS\UserBundle\Form\Factory\FormFactory;
|
|
||||||
use Symfony\Component\Form\FormFactoryInterface;
|
use Symfony\Component\Form\FormFactoryInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,6 +11,7 @@ class SourceType extends AbstractType
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const CLASS_PARAMETER_NAME = 'class';
|
const CLASS_PARAMETER_NAME = 'class';
|
||||||
|
@ -16,7 +16,6 @@ use App\Domain\SecureManagement\SecureRequestedRightCheckerInterface;
|
|||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
use App\Domain\RepositoryManagement\LayerRepositoryFactoryServiceInterface;
|
use App\Domain\RepositoryManagement\LayerRepositoryFactoryServiceInterface;
|
||||||
use App\Domain\FormManagement\RequestedActionFormBuilderServiceInterface;
|
use App\Domain\FormManagement\RequestedActionFormBuilderServiceInterface;
|
||||||
use App\Form\Source\PureSourceType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use App\Form\Source\PureSourceTypeInterface;
|
use App\Form\Source\PureSourceTypeInterface;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class AbstractActionTest extends TestCase
|
|||||||
return $this->isSecure;
|
return $this->isSecure;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function isValidByForm(): bool
|
protected function isValid(): bool
|
||||||
{
|
{
|
||||||
return $this->validByForm;
|
return $this->validByForm;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,5 @@ class RequestedActionFormBuilderServiceTest extends TestCase
|
|||||||
//$this->assertTrue(method_exists($result, 'isValid'));
|
//$this->assertTrue(method_exists($result, 'isValid'));
|
||||||
$this->assertEquals($formBuilder, $result);
|
$this->assertEquals($formBuilder, $result);
|
||||||
$this->assertEquals($entityFormBuilderService->create($requestedAction), $entityFormBuilderService->createByService());
|
$this->assertEquals($entityFormBuilderService->create($requestedAction), $entityFormBuilderService->createByService());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user