Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Search Result not from Index
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 15 Sep 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\Content\Search\Result;
|
||||
@@ -32,6 +31,11 @@ class _Custom extends \IPS\Content\Search\Result
|
||||
* @brief Image
|
||||
*/
|
||||
protected $image;
|
||||
|
||||
/**
|
||||
* @brief Data used for merging multiple extra items
|
||||
*/
|
||||
protected $mergeData;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -39,14 +43,39 @@ class _Custom extends \IPS\Content\Search\Result
|
||||
* @param \IPS\DateTime $time The time for this result
|
||||
* @param string $html HTML to display
|
||||
* @param string|NULL $image HTML for image to display
|
||||
* @param string|NULL $mergeData Data for merging
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( \IPS\DateTime $time, $html, $image = NULL )
|
||||
public function __construct( \IPS\DateTime $time, $html, $image = NULL, $mergeData = NULL )
|
||||
{
|
||||
$this->createdDate = $time;
|
||||
$this->lastUpdatedDate = $time;
|
||||
$this->html = $html;
|
||||
$this->image = $image;
|
||||
$this->mergeData = array( $mergeData );
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge in new data
|
||||
*
|
||||
* @param string $html New HTML to merge in as a list
|
||||
* @param string|NULL $mergeData Data for merging
|
||||
* @return void
|
||||
*/
|
||||
public function mergeInData( $html, $mergeData = NULL )
|
||||
{
|
||||
$this->html = $html;
|
||||
$this->mergeData[] = $mergeData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data for merging
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getMergeData()
|
||||
{
|
||||
return $this->mergeData ?: array();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user