77 lines
2.0 KiB
PHP
Raw Normal View History

2015-08-12 14:10:25 +02:00
<?php
require(dirname(__FILE__).'/../../blockadshooks.php');
class AdminAdsController extends ModuleAdminController {
public function __construct()
{
$this->identifier = 'id_block_ads';
$this->lang = true;
$this->table = 'ads';
$this->className = 'BlockAds';
$this->bootstrap = true;
$this->addRowAction('view');
$this->addRowAction('edit');
parent::__construct();
}
public function renderList()
{
$this->fields_list = array(
'id_block_ads' => array(
'title' => 'ID',
'width' => 25,
'class' => 'text-center',
),
'label' => array(
'title' => $this->l('Label'),
)
);
return parent::renderList();
}
public function renderForm()
{
$this->fields_form = array(
'multilang' => true,
'tinymce' => true,
'legend' => array(
'title' => $this->l('Ads'),
),
'submit' => array(
'title' => $this->l('Save'),
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Label'),
'name' => 'label',
),
array(
'type' => 'text',
'label' => $this->l('Width'),
'name' => 'width',
),
array(
'type' => 'text',
'label' => $this->l('Height'),
'name' => 'height',
),
array(
'type' => 'textarea',
'label' => $this->l('Default content'),
'name' => 'content',
'lang' => true
),
)
);
return parent::renderForm();
}
}