Файл: concrete5.7.5.6/concrete/src/Backup/ContentImporter/ValueInspector/Item/PageItem.php
Строк: 35
<?php
namespace ConcreteCoreBackupContentImporterValueInspectorItem;
use ConcreteCorePagePage;
class PageItem extends AbstractItem
{
public function getDisplayName()
{
return t('Page');
}
public function getContentObject()
{
if ($this->getReference() == '/' || $this->getReference() == '') {
return Page::getByID(HOME_CID, 'ACTIVE');
}
$c = Page::getByPath($this->getReference(), 'ACTIVE');
if (is_object($c) && !$c->isError()) {
return $c;
}
}
public function getContentValue()
{
if ($o = $this->getContentObject()) {
return sprintf("{CCM:CID_%s}", $o->getCollectionID());
}
}
public function getFieldValue()
{
if ($o = $this->getContentObject()) {
return $o->getCollectionID();
}
}
}