Вход Регистрация
Файл: concrete5.7.5.6/concrete/src/Area/Layout/Preset/Preset.php
Строк: 79
<?php
namespace ConcreteCoreAreaLayoutPreset;

use 
ConcreteCoreAreaLayoutColumnInterface;
use 
ConcreteCoreAreaLayoutPresetFormatterFormatterInterface;

class 
Preset implements PresetInterface
{

    protected 
$name;
    protected 
$identifier;
    protected 
$formatter;

    public function 
__construct($identifier$nameFormatterInterface $formatter$columns = array())
    {
        
$this->name $name;
        
$this->identifier $identifier;
        
$this->formatter $formatter;
        foreach(
$columns as $column) {
            
$this->addColumn($column);
        }
    }

    public function 
addColumn(ColumnInterface $column)
    {
        
$this->columns[] = $column;
    }

    public function 
getColumns()
    {
        return 
$this->columns;
    }

    
/**
     * @return mixed
     */
    
public function getName()
    {
        return 
$this->name;
    }

    
/**
     * @param mixed $name
     */
    
public function setName($name)
    {
        
$this->name $name;
    }

    
/**
     * @return mixed
     */
    
public function getIdentifier()
    {
        return 
$this->identifier;
    }

    
/**
     * @param mixed $identifier
     */
    
public function setIdentifier($identifier)
    {
        
$this->identifier $identifier;
    }

    public static function 
getByID($identifier)
    {
        
$manager Core::make('manager/area_layout_preset_provider');
        return 
$manager->getPresetByIdentifier($identifier);
    }

    
/**
     * @return ConcreteCoreAreaLayoutPresetFormatterFormatterInterface
     */
    
public function getFormatter()
    {
        return 
$this->formatter;
    }

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