Вход Регистрация
Файл: concrete5.7.5.6/concrete/src/Page/Type/PublishTarget/Configuration/ParentPageConfiguration.php
Строк: 56
<?php
namespace ConcreteCorePageTypePublishTargetConfiguration;

use 
ConcreteCorePageTypeType;
use 
Loader;
use 
Page;

class 
ParentPageConfiguration extends Configuration
{

    protected 
$cParentID;

    public function 
setParentPageID($cParentID)
    {
        
$this->cParentID $cParentID;
    }

    
/**
     * Note: if a configuration contains this method, it is assumed that the configuration will default to this page and
     * can skip composer
     */
    
public function getDefaultParentPageID()
    {
        return 
$this->getParentPageID();
    }

    public function 
getParentPageID()
    {
        return 
$this->cParentID;
    }

    public function 
getPageTypePublishTargetConfiguredTargetParentPageID()
    {
        return 
$this->cParentID;
    }

    public function 
export($cxml)
    {
        
$target parent::export($cxml);
        
$c Page::getByID($this->cParentID);
        if (
is_object($c) && !$c->isError()) {
            
$target->addAttribute('path'$c->getCollectionPath());
        }
    }

    public function 
canPublishPageTypeBeneathTarget(Type $pagetypeConcreteCorePagePage $page)
    {
        return 
$page->getCollectionID() == $this->getParentPageID();
    }


}
Онлайн: 0
Реклама