.
*
* PHP version 5
* @copyright cgo IT, 2012-2013
* @author Carsten Götzinger (info@cgo-it.de)
* @package aeo
* @license GNU/LGPL
* @filesource
*/
/**
* palettes
*/
$GLOBALS['TL_DCA']['tl_module']['palettes']['aeo'] = '{title_legend},name,headline,type;{aeo_legend},aeo_show_info,aeo_info_text,aeo_disable;{template_legend:hide},aeo_custom_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space';
/**
* extend existing expert_legend
*/
foreach ($GLOBALS['TL_DCA']['tl_module']['palettes'] as $key => $palette) {
if (!is_array($palette) && $key != 'aeo') {
$GLOBALS['TL_DCA']['tl_module']['palettes'][$key] = $palette.';{aeo_legend:hide},aeo_disable';
}
}
//foreach ($GLOBALS['TL_DCA']['tl_module']['palettes'] as $key => $palette) {
// if (!is_array($palette)) {
// print "
$key => $palette
\n";
// }
//}
/**
* fields
*/
$GLOBALS['TL_DCA']['tl_module']['fields']['aeo_custom_template'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['aeo_custom_template'],
'default' => 'aeo_default_no_js',
'exclude' => true,
'inputType' => 'select',
'options_callback' => array('tl_module_aeo', 'getAeoTemplates'),
'eval' => array('tl_class'=>'w50')
);
$GLOBALS['TL_DCA']['tl_module']['fields']['aeo_show_info'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['aeo_show_info'],
'exclude' => true,
'filter' => false,
'search' => false,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50')
);
$GLOBALS['TL_DCA']['tl_module']['fields']['aeo_info_text'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['aeo_info_text'],
'exclude' => true,
'filter' => false,
'search' => false,
'inputType' => 'textarea',
'eval' => array('rte'=>'tinyMCE', 'tl_class'=>'clr')
);
$GLOBALS['TL_DCA']['tl_module']['fields']['aeo_disable'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['aeo_disable'],
'default' => '',
'exclude' => true,
'filter' => false,
'search' => false,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'long')
);
/**
* Class tl_module_aeo
*/
class tl_module_aeo extends \Backend
{
/**
* Return all navigation templates as array
* @param DataContainer
* @return array
*/
public function getAeoTemplates(\DataContainer $dc)
{
$intPid = $dc->activeRecord->pid;
if ($this->Input->get('act') == 'overrideAll')
{
$intPid = $this->Input->get('id');
}
return $this->getTemplateGroup('aeo_', $intPid);
}
}
?>