Added missing files
This commit is contained in:
61
core/lib/Thelia/Core/Event/FeatureProductDeleteEvent.php
Normal file
61
core/lib/Thelia/Core/Event/FeatureProductDeleteEvent.php
Normal 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;
|
||||
}
|
||||
}
|
||||
52
core/lib/Thelia/Core/Event/FeatureProductEvent.php
Normal file
52
core/lib/Thelia/Core/Event/FeatureProductEvent.php
Normal 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;
|
||||
}
|
||||
}
|
||||
89
core/lib/Thelia/Core/Event/FeatureProductUpdateEvent.php
Normal file
89
core/lib/Thelia/Core/Event/FeatureProductUpdateEvent.php
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user