On continue à adapter le template...
This commit is contained in:
157
local/modules/Selection/Event/SelectionContainerEvent.php
Normal file
157
local/modules/Selection/Event/SelectionContainerEvent.php
Normal file
@@ -0,0 +1,157 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: audreymartel
|
||||
* Date: 10/07/2018
|
||||
* Time: 09:32
|
||||
*/
|
||||
|
||||
namespace Selection\Event;
|
||||
|
||||
use Selection\Model\SelectionContainer;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
class SelectionContainerEvent extends ActionEvent
|
||||
{
|
||||
protected $id;
|
||||
protected $code;
|
||||
protected $title;
|
||||
protected $chapo;
|
||||
protected $postscriptum;
|
||||
protected $description;
|
||||
private $selectionContainer;
|
||||
private $locale;
|
||||
|
||||
/*----------------------------- Selection object Parts*/
|
||||
public function __construct(SelectionContainer $selectionContainer = null)
|
||||
{
|
||||
$this->selectionContainer = $selectionContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $id
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $title
|
||||
*/
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $chapo
|
||||
*/
|
||||
public function setChapo($chapo)
|
||||
{
|
||||
$this->chapo = $chapo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $postscriptum
|
||||
*/
|
||||
public function setPostscriptum($postscriptum)
|
||||
{
|
||||
$this->postscriptum = $postscriptum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $desciption
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
public function setLocale($locale)
|
||||
{
|
||||
$this->locale = $locale;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function hasSelection()
|
||||
{
|
||||
return ! is_null($this->selectionContainer);
|
||||
}
|
||||
|
||||
public function getSelectionContainer()
|
||||
{
|
||||
return $this->selectionContainer;
|
||||
}
|
||||
|
||||
public function setSelectionContainer($selectionContainer)
|
||||
{
|
||||
$this->selectionContainer = $selectionContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getLocale()
|
||||
{
|
||||
return $this->locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getChapo()
|
||||
{
|
||||
return $this->chapo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPostscriptum()
|
||||
{
|
||||
return $this->postscriptum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $code
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->code = $code;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
213
local/modules/Selection/Event/SelectionEvent.php
Normal file
213
local/modules/Selection/Event/SelectionEvent.php
Normal file
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
namespace Selection\Event;
|
||||
|
||||
use Selection\Model\Selection;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
class SelectionEvent extends ActionEvent
|
||||
{
|
||||
|
||||
/*---- GENERAL parts */
|
||||
protected $id;
|
||||
protected $containerId;
|
||||
protected $code;
|
||||
protected $title;
|
||||
protected $chapo;
|
||||
protected $description;
|
||||
protected $postscriptum;
|
||||
|
||||
/*---- SEO parts */
|
||||
protected $url;
|
||||
protected $meta_title;
|
||||
protected $meta_description;
|
||||
protected $meta_keywords;
|
||||
|
||||
/*---- LOCAL parts */
|
||||
protected $locale;
|
||||
protected $currentLocale;
|
||||
|
||||
/*---- SELECTIONS OBJECT parts */
|
||||
/** @var Selection $selection */
|
||||
protected $selection;
|
||||
|
||||
/*----------------------------- General parts */
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
|
||||
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 getLocale()
|
||||
{
|
||||
return $this->locale;
|
||||
}
|
||||
|
||||
public function setLocale($locale)
|
||||
{
|
||||
$this->locale = $locale;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------- SEO EVENT PARTS */
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMetaTitle()
|
||||
{
|
||||
return $this->meta_title;
|
||||
}
|
||||
|
||||
public function setMetaTitle($meta_title)
|
||||
{
|
||||
$this->meta_title = $meta_title;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMetaDescription()
|
||||
{
|
||||
return $this->meta_description;
|
||||
}
|
||||
|
||||
public function setMetaDescription($meta_description)
|
||||
{
|
||||
$this->meta_description = $meta_description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMetaKeywords()
|
||||
{
|
||||
return $this->meta_keywords;
|
||||
}
|
||||
|
||||
public function setMetaKeywords($meta_keywords)
|
||||
{
|
||||
$this->meta_keywords = $meta_keywords;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/*----------------------------- Selection object Parts*/
|
||||
public function __construct(Selection $selection = null)
|
||||
{
|
||||
$this->selection = $selection;
|
||||
}
|
||||
|
||||
public function getSelection()
|
||||
{
|
||||
return $this->selection;
|
||||
}
|
||||
|
||||
public function setSelection($selection)
|
||||
{
|
||||
$this->selection = $selection;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function hasSelection()
|
||||
{
|
||||
|
||||
return ! is_null($this->selection);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getContainerId()
|
||||
{
|
||||
return $this->containerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $containerId
|
||||
*/
|
||||
public function setContainerId($containerId)
|
||||
{
|
||||
$this->containerId = $containerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $code
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->code = $code;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
47
local/modules/Selection/Event/SelectionEvents.php
Normal file
47
local/modules/Selection/Event/SelectionEvents.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: mbruchet
|
||||
* Date: 21/03/2018
|
||||
* Time: 09:20
|
||||
*/
|
||||
|
||||
namespace Selection\Event;
|
||||
|
||||
class SelectionEvents
|
||||
{
|
||||
const BEFORE_CREATE_SELECTION = 'action.selection.before.create';
|
||||
const AFTER_CREATE_SELECTION = 'action.selection.after.create';
|
||||
const SELECTION_CREATE = 'action.selection.create';
|
||||
|
||||
const BEFORE_UPDATE_SELECTION = 'action.selection.before.update';
|
||||
const AFTER_UPDATE_SELECTION = 'action.selection.after.update';
|
||||
const SELECTION_UPDATE = 'action.selection.update';
|
||||
|
||||
const BEFORE_DELETE_SELECTION = 'action.selection.before.delete';
|
||||
const AFTER_DELETE_SELECTION = 'action.selection.after.delete';
|
||||
const SELECTION_DELETE = 'action.selection.delete';
|
||||
|
||||
const SELECTION_UPDATE_SEO = 'action.selection.update.seo';
|
||||
const SELECTION_TOGGLE_VISIBILITY = 'action.toggle.selection.visibility';
|
||||
const SELECTION_UPDATE_POSITION = 'action.selection.update.position';
|
||||
const RELATED_PRODUCT_UPDATE_POSITION = 'action.selection.relatedProduct.update.position';
|
||||
|
||||
//CONTAINER EVENTS
|
||||
|
||||
const SELECTION_CONTAINER_CREATE = 'action.selection.container.create';
|
||||
const SELECTION_CONTAINER_DELETE = 'action.selection.container.delete';
|
||||
const SELECTION_CONTAINER_UPDATE = 'action.selection.container.update';
|
||||
const SELECTION_CONTAINER_UPDATE_POSITION = 'action.selection.container.update.position';
|
||||
const SELECTION_CONTAINER_UPDATE_SEO = 'action.selection.container.update.seo';
|
||||
const SELECTION_CONTAINER_TOGGLE_VISIBILITY = 'action.selection.container.visibility';
|
||||
|
||||
const BEFORE_CREATE_SELECTION_CONTAINER = 'action.selection.container.before.create';
|
||||
const AFTER_CREATE_SELECTION_CONTAINER = 'action.selection.container.after.create';
|
||||
const BEFORE_UPDATE_SELECTION_CONTAINER = 'action.selection.container.before.update';
|
||||
const AFTER_UPDATE_SELECTION_CONTAINER = 'action.selection.container.after.update';
|
||||
const BEFORE_DELETE_SELECTION_CONTAINER = 'action.selection.container.before.delete';
|
||||
const AFTER_DELETE_SELECTION_CONTAINER = 'action.selection.container.after.delete';
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user