manage lanf <=> url assignment

This commit is contained in:
Manuel Raynaud
2013-10-23 19:04:49 +02:00
parent d81c384ce0
commit a7796cf481
7 changed files with 142 additions and 42 deletions

View 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;
}
}

View File

@@ -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()
),
)