Refactored code and implemented parts of AccessManagement

This commit is contained in:
Kevin Frantz
2019-04-13 20:12:32 +02:00
parent 67d753d9ef
commit 74aad46978
25 changed files with 412 additions and 372 deletions

View File

@@ -0,0 +1,12 @@
<?php
namespace Infinito\Form\Entity;
use Infinito\Form\AbstractType;
/**
* @author kevinfrantz
*/
abstract class AbstractEntityFormType extends AbstractType implements EntityFormTypeInterface
{
}

View File

@@ -0,0 +1,12 @@
<?php
namespace Infinito\Form\Entity;
use Infinito\Form\TypeInterface;
/**
* @author kevinfrantz
*/
interface EntityFormTypeInterface extends TypeInterface
{
}

View File

@@ -1,17 +1,17 @@
<?php
namespace Infinito\Form\Source\Primitive\Text;
namespace Infinito\Form\Entity\Source\Primitive\Text;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Infinito\Form\Source\SourceType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Form\Entity\Source\SourceFormType;
/**
* @author kevinfrantz
*/
class TextSourceCreateType extends SourceType
class TextSourceCreateType extends SourceFormType
{
/**
* {@inheritdoc}

View File

@@ -1,6 +1,6 @@
<?php
namespace Infinito\Form\Source\Primitive\Text;
namespace Infinito\Form\Entity\Source\Primitive\Text;
/**
* @author kevinfrantz

View File

@@ -1,6 +1,6 @@
<?php
namespace Infinito\Form\Source;
namespace Infinito\Form\Entity\Source;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -11,7 +11,7 @@ use Infinito\Attribut\ClassAttributInterface;
/**
* @author kevinfrantz
*/
final class PureSourceCreateType extends SourceType
final class PureSourceCreateType extends SourceFormType
{
/**
* {@inheritdoc}
@@ -22,7 +22,7 @@ final class PureSourceCreateType extends SourceType
{
$builder
->add(SlugAttributInterface::SLUG_ATTRIBUT_NAME)
->add(ClassAttributInterface::CLASS_ATTRIBUT_NAME, SourceType::class, [
->add(ClassAttributInterface::CLASS_ATTRIBUT_NAME, SourceFormType::class, [
'mapped' => false,
]);
}

View File

@@ -0,0 +1,12 @@
<?php
namespace Infinito\Form\Entity\Source;
/**
* @author kevinfrantz
*
* @todo Rename!
*/
interface PureSourceFormTypeInterface
{
}

View File

@@ -0,0 +1,12 @@
<?php
namespace Infinito\Form\Entity\Source;
use Infinito\Form\Entity\AbstractEntityFormType;
/**
* @author kevinfrantz
*/
class SourceFormType extends AbstractEntityFormType
{
}

View File

@@ -1,14 +0,0 @@
<?php
namespace Infinito\Form\Source;
use Infinito\Form\TypeInterface;
/**
* @author kevinfrantz
*
* @todo Rename!
*/
interface PureSourceTypeInterface extends TypeInterface
{
}

View File

@@ -1,18 +0,0 @@
<?php
namespace Infinito\Form\Source;
use Infinito\Form\AbstractType;
/**
* @author kevinfrantz
*/
class SourceType extends AbstractType
{
/**
* @deprecated
*
* @var string
*/
const CLASS_PARAMETER_NAME = 'class';
}

View File

@@ -8,9 +8,14 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class UserSourceType extends AbstractType
{
/**
* @todo implement
* {@inheritdoc}
*
* @see \Symfony\Component\Form\AbstractType::buildForm()
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('namesource', NameSourceType::class);
}
public function configureOptions(OptionsResolver $resolver)