<?php
/**
* Copyright (C) 2021 Rhyme Digital, LLC.
*
* @link https://rhyme.digital
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
*/
namespace Rhyme\WMassArtsHub\ContentElement;
use Contao\ContentText;
use Contao\StringUtil;
use Rhyme\WMassArtsHub\Helper\ProfileHelper;
use Rhyme\WMassArtsHub\Model\Profile\Item;
/**
* Featured Profile
*/
class PageHeader extends ContentText
{
/**
* Template
* @var string
*/
protected $strTemplate = 'ce_pageheader';
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
return parent::generate();
}
/**
* Generate content element
*/
protected function compile()
{
//Add in custom classes
$extraClassesArr = StringUtil::deserialize($this->classOptions, true);
$extraClasses = '';
foreach($extraClassesArr as $class) {
$extraClasses .= (strlen($extraClasses) > 0 ? ' ' : '') . trim($class);
}
$this->Template->extraClasses = $extraClasses;
parent::compile();
}
}