Файл: concrete5.7.5.6/concrete/src/Multilingual/Page/Section/Processor/MultilingualProcessorTarget.php
Строк: 51
<?php
namespace ConcreteCoreMultilingualPageSectionProcessor;
use ConcreteCoreFoundationProcessorTargetInterface;
use ConcreteCoreMultilingualPageSectionSection;
use ConcreteCorePageStackStackList;
defined('C5_EXECUTE') or die("Access Denied.");
class MultilingualProcessorTarget implements TargetInterface
{
protected $section;
public function __construct(Section $section)
{
$this->section = $section;
}
/**
* @return Section
*/
public function getSection()
{
return $this->section;
}
public function getItems()
{
$pages = $this->section->populateRecursivePages(array(), array(
'cID' => $this->section->getCollectionID()),
$this->section->getCollectionParentID(), 0, false
);
// Add in all the stack pages found for the current locale.
$list = new StackList();
$list->filterByLanguageSection($this->getSection());
$results = $list->get();
foreach($results as $result) {
$pages[] = array('cID' => $result->getCollectionID());
}
return $pages;
}
}