create contentAddFolder process

This commit is contained in:
Manuel Raynaud
2013-10-01 09:51:07 +02:00
parent cc370af113
commit dfda04ddd2
7 changed files with 133 additions and 10 deletions

View File

@@ -0,0 +1,66 @@
<?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\Content;
use Thelia\Model\Content;
/**
* Class ContentAddFolderEvent
* @package Thelia\Core\Event\Content
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class ContentAddFolderEvent extends ContentEvent
{
/**
* @var int folder id
*/
protected $folderId;
public function __construct(Content $content, $folderId)
{
$this->folderId = $folderId;
parent::__construct($content);
}
/**
* @param int $folderId
*/
public function setFolderId($folderId)
{
$this->folderId = $folderId;
}
/**
* @return int
*/
public function getFolderId()
{
return $this->folderId;
}
}

View File

@@ -193,8 +193,9 @@ final class TheliaEvents
const CONTENT_TOGGLE_VISIBILITY = "action.toggleContentVisibility";
const CONTENT_UPDATE_POSITION = "action.updateContentPosition";
// const FOLDER_ADD_CONTENT = "action.categoryAddContent";
// const FOLDER_REMOVE_CONTENT = "action.categoryRemoveContent";
const CONTENT_ADD_FOLDER = "action.contentAddFolder";
const CONTENT_REMOVE_FOLDER = "action.contentRemoveFolder";
const BEFORE_CREATECONTENT = "action.before_createContent";
const AFTER_CREATECONTENT = "action.after_createContent";