[11/06/2024] Les premières modifs + installation de quelques modules indispensables
This commit is contained in:
87
domokits/local/modules/RewriteUrl/Form/AddUrlForm.php
Executable file
87
domokits/local/modules/RewriteUrl/Form/AddUrlForm.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the RewriteUrl module for Thelia. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace RewriteUrl\Form;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
|
||||
/**
|
||||
* Class AddUrlForm
|
||||
* @package RewriteUrl\Form
|
||||
* @author Vincent Lopes <vlopes@openstudio.fr>
|
||||
*/
|
||||
class AddUrlForm extends BaseForm
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function getName()
|
||||
{
|
||||
return "rewriteurl_add_form";
|
||||
}
|
||||
|
||||
public function buildForm()
|
||||
{
|
||||
$this->formBuilder
|
||||
->add(
|
||||
'view',
|
||||
TextType::class,
|
||||
array(
|
||||
'constraints' => array(new NotBlank()),
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
->add(
|
||||
'view-id',
|
||||
TextType::class,
|
||||
array(
|
||||
'constraints' => array(new NotBlank()),
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
->add(
|
||||
'url',
|
||||
TextType::class,
|
||||
array(
|
||||
'constraints' => array(new NotBlank()),
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
->add(
|
||||
'default',
|
||||
TextType::class,
|
||||
array(
|
||||
'constraints' => array(new NotBlank()),
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
->add(
|
||||
'locale',
|
||||
TextType::class,
|
||||
array(
|
||||
'constraints' => array(new NotBlank()),
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
->add(
|
||||
'httpcode',
|
||||
TextType::class,
|
||||
array(
|
||||
'constraints' => array(new NotBlank()),
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
;
|
||||
}
|
||||
}
|
||||
62
domokits/local/modules/RewriteUrl/Form/ReassignForm.php
Executable file
62
domokits/local/modules/RewriteUrl/Form/ReassignForm.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the RewriteUrl module for Thelia. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace RewriteUrl\Form;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
|
||||
/**
|
||||
* Class ReassignForm
|
||||
* @package RewriteUrl\Form
|
||||
* @author Vincent Lopes <vlopes@openstudio.fr>
|
||||
*/
|
||||
class ReassignForm extends BaseForm
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function getName()
|
||||
{
|
||||
return "rewriteurl_reassign_form";
|
||||
}
|
||||
|
||||
protected function buildForm()
|
||||
{
|
||||
$this->formBuilder
|
||||
->add(
|
||||
'rewrite-id',
|
||||
IntegerType::class,
|
||||
array(
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
->add(
|
||||
'select-reassign',
|
||||
TextType::class,
|
||||
array(
|
||||
'constraints' => array(new NotBlank()),
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
->add(
|
||||
'all',
|
||||
IntegerType::class,
|
||||
array(
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
;
|
||||
}
|
||||
}
|
||||
46
domokits/local/modules/RewriteUrl/Form/SetDefaultForm.php
Executable file
46
domokits/local/modules/RewriteUrl/Form/SetDefaultForm.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the RewriteUrl module for Thelia. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace RewriteUrl\Form;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
use Thelia\Form\BaseForm;
|
||||
|
||||
/**
|
||||
* Class SetDefaultForm
|
||||
* @package RewriteUrl\Form
|
||||
* @author Vincent Lopes <vlopes@openstudio.fr>
|
||||
*/
|
||||
class SetDefaultForm extends BaseForm
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function getName()
|
||||
{
|
||||
return "rewriteurl_setdefault_form";
|
||||
}
|
||||
|
||||
protected function buildForm()
|
||||
{
|
||||
$this->formBuilder
|
||||
->add(
|
||||
'rewrite-id',
|
||||
TextType::class,
|
||||
array(
|
||||
'constraints' => array(new NotBlank()),
|
||||
'required' => true
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user