Skip to content

Commit

Permalink
EZP-24786: Added RoleCreateType
Browse files Browse the repository at this point in the history
  • Loading branch information
lolautruche committed Sep 11, 2015
1 parent fe1907d commit 037f83c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bundle/Resources/translations/ezrepoforms_role.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<source>role.form.delete</source>
<target>Delete</target>
</trans-unit>
<trans-unit id="565405ab5f15e4274e9edf5301d567b1">
<source>role.create</source>
<target>Create a role</target>
</trans-unit>
</body>
</file>
</xliff>
31 changes: 31 additions & 0 deletions lib/Form/Type/Role/RoleCreateType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* This file is part of the eZ RepositoryForms package.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace EzSystems\RepositoryForms\Form\Type\Role;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class RoleCreateType extends AbstractType
{
public function getName()
{
return 'ezrepoforms_role_create';
}

public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(['translation_domain' => 'ezrepoforms_role']);
}

public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('create', 'submit', ['label' => 'role.create']);
}
}

0 comments on commit 037f83c

Please sign in to comment.