Added missing files

This commit is contained in:
franck
2013-09-20 15:59:19 +02:00
parent e27b3cfbae
commit 5622a246b2
18 changed files with 6767 additions and 8 deletions

View File

@@ -0,0 +1,61 @@
<?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\Core\Event;
use Thelia\Model\FeatureProduct;
class FeatureProductDeleteEvent extends FeatureProductEvent
{
protected $product_id;
protected $feature_id;
public function __construct($product_id, $feature_id)
{
$this->product_id = $product_id;
$this->feature_id = $feature_id;
}
public function getProductId()
{
return $this->product_id;
}
public function setProductId($product_id)
{
$this->product_id = $product_id;
return $this;
}
public function getFeatureId()
{
return $this->feature_id;
}
public function setFeatureId($feature_id)
{
$this->feature_id = $feature_id;
return $this;
}
}

View File

@@ -0,0 +1,52 @@
<?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\Core\Event;
use Thelia\Model\FeatureProduct;
class FeatureProductEvent extends ActionEvent
{
protected $featureProduct = null;
public function __construct(FeatureProduct $featureProduct = null)
{
$this->featureProduct = $featureProduct;
}
public function hasFeatureProduct()
{
return ! is_null($this->featureProduct);
}
public function getFeatureProduct()
{
return $this->featureProduct;
}
public function setFeatureProduct($featureProduct)
{
$this->featureProduct = $featureProduct;
return $this;
}
}

View File

@@ -0,0 +1,89 @@
<?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\Core\Event;
use Thelia\Model\FeatureProduct;
class FeatureProductUpdateEvent extends FeatureProductEvent
{
protected $product_id;
protected $feature_id;
protected $feature_value;
protected $is_text_value;
public function __construct($product_id, $feature_id, $feature_value, $is_text_value = false)
{
$this->product_id = $product_id;
$this->feature_id = $feature_id;
$this->feature_value = $feature_value;
$this->is_text_value = $is_text_value;
}
public function getProductId()
{
return $this->product_id;
}
public function setProductId($product_id)
{
$this->product_id = $product_id;
return $this;
}
public function getFeatureId()
{
return $this->feature_id;
}
public function setFeatureId($feature_id)
{
$this->feature_id = $feature_id;
return $this;
}
public function getFeatureValue()
{
return $this->feature_value;
}
public function setFeatureValue($feature_value)
{
$this->feature_value = $feature_value;
return $this;
}
public function getIsTextValue()
{
return $this->is_text_value;
}
public function setIsTextValue($is_text_value)
{
$this->is_text_value = $is_text_value;
return $this;
}
}

View File

@@ -79,14 +79,14 @@ class FeatureValue extends BaseI18nLoop
{
$search = FeatureProductQuery::create();
// manage featureAv translations
$locale = $this->configureI18nProcessing(
$search,
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
FeatureAvTableMap::TABLE_NAME,
'FEATURE_AV_ID',
true
);
// manage featureAv translations
$locale = $this->configureI18nProcessing(
$search,
array('TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM'),
FeatureAvTableMap::TABLE_NAME,
'FEATURE_AV_ID',
true
);
$feature = $this->getFeature();
@@ -132,6 +132,7 @@ class FeatureValue extends BaseI18nLoop
$loopResult = new LoopResult($featureValues);
foreach ($featureValues as $featureValue) {
$loopResultRow = new LoopResultRow($loopResult, $featureValue, $this->versionable, $this->timestampable, $this->countable);
$loopResultRow