manage lanf <=> url assignment
This commit is contained in:
46
core/lib/Thelia/Form/Lang/LangUrlEvent.php
Normal file
46
core/lib/Thelia/Form/Lang/LangUrlEvent.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Form\Lang;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
|
||||
/**
|
||||
* Class LangUrlEvent
|
||||
* @package Thelia\Form\Lang
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class LangUrlEvent extends ActionEvent
|
||||
{
|
||||
protected $url = array();
|
||||
|
||||
public function addUrl($id, $url)
|
||||
{
|
||||
$this->url[$id] = $url;
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ use Thelia\Model\LangQuery;
|
||||
*/
|
||||
class LangUrlForm extends BaseForm
|
||||
{
|
||||
const LANG_PREFIX = 'url';
|
||||
const LANG_PREFIX = 'url_';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -69,6 +69,7 @@ class LangUrlForm extends BaseForm
|
||||
"attr" => array(
|
||||
"tag" => "url",
|
||||
"url_id" => $lang->getId(),
|
||||
"url_title" => $lang->getTitle()
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user