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

namespace ConcreteCorePageTypePublishTargetType;

use 
ConcreteCorePageTypeType as PageType;
use 
ConcreteCorePageTypePublishTargetConfigurationAllConfiguration;

class 
AllType extends Type
{
    public function 
configurePageTypePublishTarget(PageType $pt$post)
    {
        
$configuredTarget = new AllConfiguration($this);
        
$configuredTarget->setSelectorFormFactor(isset($post['selectorFormFactorAll']) ? $post['selectorFormFactorAll'] : null);
        
$configuredTarget->setStartingPointPageID(isset($post['startingPointPageIDAll']) ? $post['startingPointPageIDAll'] : null);

        return 
$configuredTarget;
    }

    public function 
configurePageTypePublishTargetFromImport($txml)
    {
        
$configuration = new AllConfiguration($this);
        
$formFactor = (string) $txml['form-factor'];
        if (
$formFactor) {
            
$configuration->setSelectorFormFactor($formFactor);
        }
        
$path = (string) $txml['path'];
        if (
$path) {
            
$c Page::getByPath($path);
            
$configuration->setStartingPointPageID($c->getCollectionID());
        }
        return 
$configuration;
    }
}
Онлайн: 0
Реклама