Add Action + Event to manage SEO information
This commit is contained in:
@@ -160,6 +160,7 @@ final class TheliaEvents
|
||||
const CATEGORY_DELETE = "action.deleteCategory";
|
||||
const CATEGORY_TOGGLE_VISIBILITY = "action.toggleCategoryVisibility";
|
||||
const CATEGORY_UPDATE_POSITION = "action.updateCategoryPosition";
|
||||
const CATEGORY_UPDATE_SEO = "action.updateCategorySeo";
|
||||
|
||||
const CATEGORY_ADD_CONTENT = "action.categoryAddContent";
|
||||
const CATEGORY_REMOVE_CONTENT = "action.categoryRemoveContent";
|
||||
@@ -197,6 +198,7 @@ final class TheliaEvents
|
||||
const CONTENT_DELETE = "action.deleteContent";
|
||||
const CONTENT_TOGGLE_VISIBILITY = "action.toggleContentVisibility";
|
||||
const CONTENT_UPDATE_POSITION = "action.updateContentPosition";
|
||||
const CONTENT_UPDATE_SEO = "action.updateContentSeo";
|
||||
|
||||
const CONTENT_ADD_FOLDER = "action.contentAddFolder";
|
||||
const CONTENT_REMOVE_FOLDER = "action.contentRemoveFolder";
|
||||
@@ -269,6 +271,7 @@ final class TheliaEvents
|
||||
const PRODUCT_DELETE = "action.deleteProduct";
|
||||
const PRODUCT_TOGGLE_VISIBILITY = "action.toggleProductVisibility";
|
||||
const PRODUCT_UPDATE_POSITION = "action.updateProductPosition";
|
||||
const PRODUCT_UPDATE_SEO = "action.updateProductSeo";
|
||||
|
||||
const PRODUCT_ADD_CONTENT = "action.productAddContent";
|
||||
const PRODUCT_REMOVE_CONTENT = "action.productRemoveContent";
|
||||
|
||||
130
core/lib/Thelia/Core/Event/UpdateSeoEvent.php
Normal file
130
core/lib/Thelia/Core/Event/UpdateSeoEvent.php
Normal file
@@ -0,0 +1,130 @@
|
||||
<?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;
|
||||
|
||||
class UpdateSeoEvent extends ActionEvent
|
||||
{
|
||||
protected $object_id;
|
||||
protected $locale;
|
||||
protected $url;
|
||||
protected $meta_title;
|
||||
protected $meta_description;
|
||||
protected $meta_keyword;
|
||||
|
||||
protected $object;
|
||||
|
||||
public function __construct($object_id, $locale = null, $url = null, $meta_title = null, $meta_description = null, $meta_keyword = null)
|
||||
{
|
||||
$this->object_id = $object_id;
|
||||
$this->locale = $locale;
|
||||
$this->url = $url;
|
||||
$this->meta_title = $meta_title;
|
||||
$this->meta_description = $meta_description;
|
||||
$this->meta_keyword = $meta_keyword;
|
||||
}
|
||||
|
||||
public function getObjectId()
|
||||
{
|
||||
return $this->object_id;
|
||||
}
|
||||
|
||||
public function setObjectId($object_id)
|
||||
{
|
||||
$this->object_id = $object_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLocale()
|
||||
{
|
||||
return $this->locale;
|
||||
}
|
||||
|
||||
public function setLocale($locale)
|
||||
{
|
||||
$this->locale = $locale;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
public function setParent($parent)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
|
||||
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 getMetaKeyword()
|
||||
{
|
||||
return $this->meta_keyword;
|
||||
}
|
||||
|
||||
public function setMetaKeyword($meta_keyword)
|
||||
{
|
||||
$this->meta_keyword = $meta_keyword;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user