2020-11-22 20:03:02 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* DynamicPageList3
|
|
|
|
* DPL GalleryList Class
|
|
|
|
*
|
|
|
|
* @license GPL-2.0-or-later
|
|
|
|
* @package DynamicPageList3
|
|
|
|
*
|
2021-02-22 23:48:01 +00:00
|
|
|
*/
|
2020-11-22 20:03:02 +00:00
|
|
|
|
|
|
|
namespace DPL\Lister;
|
|
|
|
|
|
|
|
use DPL\Article;
|
|
|
|
|
|
|
|
class GalleryList extends Lister {
|
|
|
|
/**
|
|
|
|
* Listing style for this class.
|
|
|
|
*
|
2021-02-22 23:48:01 +00:00
|
|
|
* @var constant
|
2020-11-22 20:03:02 +00:00
|
|
|
*/
|
|
|
|
public $style = parent::LIST_GALLERY;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* List(Section) Start
|
|
|
|
*
|
2021-02-22 23:48:01 +00:00
|
|
|
* @var string
|
2020-11-22 20:03:02 +00:00
|
|
|
*/
|
|
|
|
public $listStart = '<gallery%s>';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* List(Section) End
|
|
|
|
*
|
2021-02-22 23:48:01 +00:00
|
|
|
* @var string
|
2020-11-22 20:03:02 +00:00
|
|
|
*/
|
|
|
|
public $listEnd = '</gallery>';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Item Start
|
|
|
|
*
|
2021-02-22 23:48:01 +00:00
|
|
|
* @var string
|
2020-11-22 20:03:02 +00:00
|
|
|
*/
|
|
|
|
public $itemStart = "\n";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Item End
|
|
|
|
*
|
2021-02-22 23:48:01 +00:00
|
|
|
* @var string
|
2020-11-22 20:03:02 +00:00
|
|
|
*/
|
|
|
|
public $itemEnd = "|";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Format an item.
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @param object DPL\Article
|
|
|
|
* @param string [Optional] Page text to include.include.
|
|
|
|
* @return string Item HTML
|
|
|
|
*/
|
2021-02-22 23:48:01 +00:00
|
|
|
public function formatItem( Article $article, $pageText = null ) {
|
2020-11-22 20:03:02 +00:00
|
|
|
$item = $article->mTitle;
|
|
|
|
|
2021-02-22 23:48:01 +00:00
|
|
|
if ( $pageText !== null ) {
|
2020-11-22 20:03:02 +00:00
|
|
|
//Include parsed/processed wiki markup content after each item before the closing tag.
|
|
|
|
$item .= $pageText;
|
|
|
|
}
|
|
|
|
|
|
|
|
$item = $this->getItemStart() . $item . $this->itemEnd;
|
|
|
|
|
2021-02-22 23:48:01 +00:00
|
|
|
$item = $this->replaceTagParameters( $item, $article );
|
2020-11-22 20:03:02 +00:00
|
|
|
|
|
|
|
return $item;
|
|
|
|
}
|
|
|
|
}
|