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