2020-05-30 19:10:58 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* 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 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* 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, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
|
|
|
|
* @file
|
|
|
|
|
* @author DannyS712
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Page;
|
|
|
|
|
|
|
|
|
|
use ContentModelChange;
|
2021-03-02 21:29:46 +00:00
|
|
|
use MediaWiki\Permissions\Authority;
|
2020-05-30 19:10:58 +00:00
|
|
|
use WikiPage;
|
|
|
|
|
|
|
|
|
|
/**
|
2022-04-08 15:13:15 +00:00
|
|
|
* Service for changing the content model of wiki pages.
|
|
|
|
|
*
|
|
|
|
|
* Default implementation is MediaWiki\Page\PageCommandFactory.
|
|
|
|
|
*
|
2020-05-30 19:10:58 +00:00
|
|
|
* @since 1.35
|
|
|
|
|
*/
|
|
|
|
|
interface ContentModelChangeFactory {
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-02 21:29:46 +00:00
|
|
|
* @param Authority $performer
|
2020-05-30 19:10:58 +00:00
|
|
|
* @param WikiPage $wikipage
|
|
|
|
|
* @param string $newContentModel
|
|
|
|
|
* @return ContentModelChange
|
|
|
|
|
*/
|
|
|
|
|
public function newContentModelChange(
|
2021-03-02 21:29:46 +00:00
|
|
|
Authority $performer,
|
2020-05-30 19:10:58 +00:00
|
|
|
WikiPage $wikipage,
|
|
|
|
|
string $newContentModel
|
2021-07-22 03:11:47 +00:00
|
|
|
): ContentModelChange;
|
2020-05-30 19:10:58 +00:00
|
|
|
}
|