public function getSearchablePages($arrPages, $intRoot=0, $blnIsSitemap=false)
	{
		$arrRoot = array();

		if ($intRoot > 0)
		{
			$arrRoot = $this->Database->getChildRecords($intRoot, 'tl_page');
		}

		$arrProcessed = array();
		$time = Date::floorToMinute();

		// Get all channels
		$objNewsletter = NewsletterChannelModel::findAll();

		// Walk through each channel
		if ($objNewsletter !== null)
		{
			while ($objNewsletter->next())
			{
				if (!$objNewsletter->jumpTo)
				{
					continue;
				}

				// Skip channels outside the root nodes
				if (!empty($arrRoot) && !\in_array($objNewsletter->jumpTo, $arrRoot))
				{
					continue;
				}

				// Get the URL of the jumpTo page
				if (!isset($arrProcessed[$objNewsletter->jumpTo]))
				{
					$objParent = PageModel::findWithDetails($objNewsletter->jumpTo);

					// The target page does not exist
					if ($objParent === null)
					{
						continue;
					}

					// The target page has not been published (see #5520)
					if (!$objParent->published || ($objParent->start != '' && $objParent->start > $time) || ($objParent->stop != '' && $objParent->stop <= ($time + 60)))
					{
						continue;
					}

					if ($blnIsSitemap)
					{
						// The target page is protected (see #8416)
						if ($objParent->protected)
						{
							continue;
						}

						// The target page is exempt from the sitemap (see #6418)
						if ($objParent->sitemap == 'map_never')
						{
							continue;
						}
					}

					// Generate the URL
					$arrProcessed[$objNewsletter->jumpTo] = $objParent->getAbsoluteUrl(Config::get('useAutoItem') ? '/%s' : '/items/%s');
				}

				$strUrl = $arrProcessed[$objNewsletter->jumpTo];

				// Get the items
				$objItem = NewsletterModel::findSentByPid($objNewsletter->id);

				if ($objItem !== null)
				{
					while ($objItem->next())
					{
						$arrPages[] = sprintf(preg_replace('/%(?!s)/', '%%', $strUrl), ($objItem->alias ?: $objItem->id));
					}
				}
			}
		}

		return $arrPages;
	}
public function getSearchablePages($arrPages, $intRoot=0, $blnIsSitemap=false)
	{
		$arrRoot = array();

		if ($intRoot > 0)
		{
			$arrRoot = $this->Database->getChildRecords($intRoot, 'tl_page');
		}

		$arrProcessed = array();
		$time = Date::floorToMinute();

		// Get all channels
		$objNewsletter = NewsletterChannelModel::findAll();

		// Walk through each channel
		if ($objNewsletter !== null)
		{
			while ($objNewsletter->next())
			{
				if (!$objNewsletter->jumpTo)
				{
					continue;
				}

				// Skip channels outside the root nodes
				if (!empty($arrRoot) && !\in_array($objNewsletter->jumpTo, $arrRoot))
				{
					continue;
				}

				// Get the URL of the jumpTo page
				if (!isset($arrProcessed[$objNewsletter->jumpTo]))
				{
					$objParent = PageModel::findWithDetails($objNewsletter->jumpTo);

					// The target page does not exist
					if ($objParent === null)
					{
						continue;
					}

					// The target page has not been published (see #5520)
					if (!$objParent->published || ($objParent->start != '' && $objParent->start > $time) || ($objParent->stop != '' && $objParent->stop <= ($time + 60)))
					{
						continue;
					}

					if ($blnIsSitemap)
					{
						// The target page is protected (see #8416)
						if ($objParent->protected)
						{
							continue;
						}

						// The target page is exempt from the sitemap (see #6418)
						if ($objParent->sitemap == 'map_never')
						{
							continue;
						}
					}

					// Generate the URL
					$arrProcessed[$objNewsletter->jumpTo] = $objParent->getAbsoluteUrl(Config::get('useAutoItem') ? '/%s' : '/items/%s');
				}

				$strUrl = $arrProcessed[$objNewsletter->jumpTo];

				// Get the items
				$objItem = NewsletterModel::findSentByPid($objNewsletter->id);

				if ($objItem !== null)
				{
					while ($objItem->next())
					{
						$arrPages[] = sprintf(preg_replace('/%(?!s)/', '%%', $strUrl), ($objItem->alias ?: $objItem->id));
					}
				}
			}
		}

		return $arrPages;
	}
public function getSearchablePages ( $ arrPages , $ intRoot = 0 , $ blnIsSitemap = false ) { $ arrRoot = array ( ) ; if ( $ intRoot > 0 ) { $ arrRoot = $ this -> Database -> getChildRecords ( $ intRoot , 'tl_page' ) ; } $ arrProcessed = array ( ) ; $ time = Date :: floorToMinute ( ) ; // Get all channels $ objNewsletter = NewsletterChannelModel :: findAll ( ) ; // Walk through each channel if ( $ objNewsletter !== null ) { while ( $ objNewsletter -> next ( ) ) { if ( ! $ objNewsletter -> jumpTo ) { continue ; } // Skip channels outside the root nodes if ( ! empty ( $ arrRoot ) && ! \ in_array ( $ objNewsletter -> jumpTo , $ arrRoot ) ) { continue ; } // Get the URL of the jumpTo page if ( ! isset ( $ arrProcessed [ $ objNewsletter -> jumpTo ] ) ) { $ objParent = PageModel :: findWithDetails ( $ objNewsletter -> jumpTo ) ; // The target page does not exist if ( $ objParent === null ) { continue ; } // The target page has not been published (see #5520) if ( ! $ objParent -> published || ( $ objParent -> start != '' && $ objParent -> start > $ time ) || ( $ objParent -> stop != '' && $ objParent -> stop <= ( $ time + 60 ) ) ) { continue ; } if ( $ blnIsSitemap ) { // The target page is protected (see #8416) if ( $ objParent -> protected ) { continue ; } // The target page is exempt from the sitemap (see #6418) if ( $ objParent -> sitemap == 'map_never' ) { continue ; } } // Generate the URL $ arrProcessed [ $ objNewsletter -> jumpTo ] = $ objParent -> getAbsoluteUrl ( Config :: get ( 'useAutoItem' ) ? '/%s' : '/items/%s' ) ; } $ strUrl = $ arrProcessed [ $ objNewsletter -> jumpTo ] ; // Get the items $ objItem = NewsletterModel :: findSentByPid ( $ objNewsletter -> id ) ; if ( $ objItem !== null ) { while ( $ objItem -> next ( ) ) { $ arrPages [ ] = sprintf ( preg_replace ( '/%(?!s)/' , '%%' , $ strUrl ) , ( $ objItem -> alias ? : $ objItem -> id ) ) ; } } } } return $ arrPages ; }
Add newsletters to the indexer

@param array   $arrPages
@param integer $intRoot
@param boolean $blnIsSitemap

@return array
Add newsletters to the indexer