AdminController::__construct PHP Метод

__construct() публичный Метод

Construct this object by extending the basic Controller class
public __construct ( )
    public function __construct()
    {
        parent::__construct();
        // special authentication check for the entire controller: Note the check-ADMIN-authentication!
        // All methods inside this controller are only accessible for admins (= users that have role type 7)
        Auth::checkAdminAuthentication();
    }

Usage Example

 public function __construct()
 {
     $this->bootstrap = true;
     $this->table = 'offer';
     $this->className = 'AphOffer';
     $this->lang = true;
     $this->explicitSelect = false;
     $this->allow_export = false;
     $this->context = Context::getContext();
     $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'icon' => 'icon-trash', 'confirm' => $this->l('Delete selected items?')));
     parent::__construct();
     $this->_defaultOrderBy = 'date_upd';
     $this->_defaultorderWay = 'DESC';
     $this->imageType = 'jpg';
     $this->max_file_size = (int) (Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1000000);
     $this->max_image_size = (int) Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE');
     // @since 1.5 : translations for tabs
     $this->available_tabs_lang = array('Informations' => $this->l('Informazioni'), 'Seo' => $this->l('SEO'), 'Products' => $this->l('Servizi'), 'Shops' => $this->l('Negozi'), 'Images' => $this->l('Images'));
     $this->available_tabs = array_merge($this->available_tabs, array('Informations' => $this->l('Informazioni'), 'Seo' => $this->l('SEO'), 'Products' => $this->l('Servizi'), 'Shops' => $this->l('Negozi'), 'Images' => $this->l('Immagini')));
     if (Configuration::get('PS_SHOP_DEFAULT') != $this->context->shop->id) {
         unset($this->available_tabs['Seo']);
         unset($this->available_tabs_lang['Seo']);
         unset($this->available_tabs['Shops']);
         unset($this->available_tabs_lang['Shops']);
     }
     $this->fields_list = array();
     $this->fields_list['id_offer'] = array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs', 'type' => 'int');
     $this->fields_list['name'] = array('title' => $this->l('Name'), 'filter_key' => 'b!name');
     $this->fields_list['available'] = array('title' => $this->l('Valida'), 'type' => 'text', 'orderby' => false, 'filter' => false, 'search' => false);
     $this->fields_list['visible'] = array('title' => $this->l('Visibile sul sito'), 'type' => 'text', 'orderby' => false, 'filter' => false, 'search' => false);
     $this->fields_list['new_price'] = array('title' => $this->l('Reduction'), 'type' => 'text', 'orderby' => false, 'filter' => false, 'search' => false);
     $this->fields_list['active'] = array('title' => $this->l('Status'), 'active' => 'status', 'align' => 'text-center', 'type' => 'bool', 'class' => 'fixed-width-sm', 'orderby' => true, 'filter' => true, 'search' => true);
 }
All Usage Examples Of AdminController::__construct