Continuing categories administration...
This commit is contained in:
@@ -46,6 +46,7 @@ class CategoryCreateEvent extends CategoryEvent
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
@@ -56,6 +57,7 @@ class CategoryCreateEvent extends CategoryEvent
|
||||
public function setParent($parent)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLocale()
|
||||
@@ -66,5 +68,6 @@ class CategoryCreateEvent extends CategoryEvent
|
||||
public function setLocale($locale)
|
||||
{
|
||||
$this->locale = $locale;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,5 +40,6 @@ class CategoryDeleteEvent extends CategoryEvent
|
||||
public function setCategoryId($category_id)
|
||||
{
|
||||
$this->category_id = $category_id;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -28,13 +28,17 @@ use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
class CategoryEvent extends ActionEvent
|
||||
{
|
||||
public $category;
|
||||
public $category = null;
|
||||
|
||||
public function __construct(Category $category)
|
||||
public function __construct(Category $category = null)
|
||||
{
|
||||
$this->category = $category;
|
||||
}
|
||||
|
||||
public function hasCategory() {
|
||||
return ! is_null($this->category);
|
||||
}
|
||||
|
||||
public function getCategory()
|
||||
{
|
||||
return $this->category;
|
||||
|
||||
@@ -22,35 +22,7 @@
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
use Thelia\Model\Category;
|
||||
|
||||
class CategoryToggleVisibilityEvent extends CategoryEvent
|
||||
class CategoryToggleVisibilityEvent extends BaseToggleVisibilityEvent
|
||||
{
|
||||
protected $category_id;
|
||||
protected $category;
|
||||
|
||||
public function __construct($category_id)
|
||||
{
|
||||
$this->category_id = $category_id;
|
||||
}
|
||||
|
||||
public function getCategoryId()
|
||||
{
|
||||
return $this->category_id;
|
||||
}
|
||||
|
||||
public function setCategoryId($category_id)
|
||||
{
|
||||
$this->category_id = $category_id;
|
||||
}
|
||||
|
||||
public function getCategory()
|
||||
{
|
||||
return $this->category;
|
||||
}
|
||||
|
||||
public function setCategory(Category $category)
|
||||
{
|
||||
$this->category = $category;
|
||||
}
|
||||
}
|
||||
@@ -22,17 +22,16 @@
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
|
||||
use Thelia\Model\Category;
|
||||
|
||||
class CategoryUpdateEvent extends ActionEvent
|
||||
class CategoryUpdateEvent extends CategoryCreateEvent
|
||||
{
|
||||
protected $category_id;
|
||||
protected $locale;
|
||||
protected $title;
|
||||
|
||||
protected $chapo;
|
||||
protected $description;
|
||||
protected $postscriptum;
|
||||
|
||||
protected $url;
|
||||
protected $visibility;
|
||||
protected $parent;
|
||||
@@ -41,4 +40,81 @@ class CategoryUpdateEvent extends ActionEvent
|
||||
{
|
||||
$this->category_id = $category_id;
|
||||
}
|
||||
|
||||
public function getCategoryId()
|
||||
{
|
||||
return $this->category_id;
|
||||
}
|
||||
|
||||
public function setCategoryId($category_id)
|
||||
{
|
||||
$this->category_id = $category_id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getChapo()
|
||||
{
|
||||
return $this->chapo;
|
||||
}
|
||||
|
||||
public function setChapo($chapo)
|
||||
{
|
||||
$this->chapo = $chapo;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPostscriptum()
|
||||
{
|
||||
return $this->postscriptum;
|
||||
}
|
||||
|
||||
public function setPostscriptum($postscriptum)
|
||||
{
|
||||
$this->postscriptum = $postscriptum;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getVisibility()
|
||||
{
|
||||
return $this->visibility;
|
||||
}
|
||||
|
||||
public function setVisibility($visibility)
|
||||
{
|
||||
$this->visibility = $visibility;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
public function setParent($parent)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,13 +26,17 @@ use Thelia\Model\Config;
|
||||
|
||||
class ConfigEvent extends ActionEvent
|
||||
{
|
||||
protected $config;
|
||||
protected $config = null;
|
||||
|
||||
public function __construct(Config $config = null)
|
||||
{
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
public function hasConfig() {
|
||||
return ! is_null($this->config);
|
||||
}
|
||||
|
||||
public function getConfig()
|
||||
{
|
||||
return $this->config;
|
||||
|
||||
@@ -26,13 +26,17 @@ use Thelia\Model\Currency;
|
||||
|
||||
class CurrencyEvent extends ActionEvent
|
||||
{
|
||||
protected $currency;
|
||||
protected $currency = null;
|
||||
|
||||
public function __construct(Currency $currency = null)
|
||||
{
|
||||
$this->currency = $currency;
|
||||
}
|
||||
|
||||
public function hasCurrency() {
|
||||
return ! is_null($this->currency);
|
||||
}
|
||||
|
||||
public function getCurrency()
|
||||
{
|
||||
return $this->currency;
|
||||
|
||||
@@ -26,13 +26,17 @@ use Thelia\Model\Message;
|
||||
|
||||
class MessageEvent extends ActionEvent
|
||||
{
|
||||
protected $message;
|
||||
protected $message = null;
|
||||
|
||||
public function __construct(Message $message = null)
|
||||
{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
public function hasMessage() {
|
||||
return ! is_null($this->message);
|
||||
}
|
||||
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->message;
|
||||
|
||||
@@ -126,7 +126,7 @@ class AsseticHelper
|
||||
//
|
||||
// before generating 3bc974a-ad3ef47.css, delete 3bc974a-* files.
|
||||
//
|
||||
if ($dev_mode == true || ! file_exists($target_file)) {
|
||||
if (/*$dev_mode == true || */! file_exists($target_file)) {
|
||||
|
||||
// Delete previous version of the file
|
||||
list($commonPart, $dummy) = explode('-', $asset_target_path);
|
||||
|
||||
Reference in New Issue
Block a user