Вход Регистрация
Файл: concrete5.7.5.6/concrete/blocks/core_gathering_display/controller.php
Строк: 54
<?php

namespace ConcreteBlockCoreGatheringDisplay;

use 
ConcreteCoreBlockBlockController;
use 
Core;

/**
 * Displays an gathering stand-alone in a page.
 *
 * @package Blocks
 * @subpackage Core Gathering Display
 *
 * @author Andrew Embler <andrew@concrete5.org>
 * @copyright  Copyright (c) 2003-2013 Concrete5. (http://www.concrete5.org)
 * @license    http://www.concrete5.org/license/     MIT License
 */
class Controller extends BlockController
{
    protected 
$btCacheBlockRecord true;
    protected 
$btTable 'btCoreGatheringDisplay';
    protected 
$btIsInternal true;
    public function 
getBlockTypeDescription()
    {
        return 
t("Proxy block for gathering items added to areas.");
    }

    public function 
getBlockTypeName()
    {
        return 
t("Gathering Display");
    }

    public function 
registerViewAssets($outputContent '')
    {
        
$this->requireAsset('core/gathering');
    }

    public function 
view()
    {
        
Core::make('helper/overlay')->init(false);
        
$gathering Gathering::getByID($this->gaID);
        if (
is_object($gathering)) {
            
$list = new GatheringItemList($gathering);
            
$list->sortByDateDescending();
            
$this->set('gathering'$gathering);
            
$this->set('itemList'$list);
        }
    }
}
Онлайн: 0
Реклама