/**
  * Constructor.
  *
  * @access  protected
  * @param array An optional associative array of configuration settings.
  * Recognized key values include 'name', 'default_task', 'model_path', and
  * 'view_path' (this list is not meant to be comprehensive).
  * @since 1.5
  */
 public function __construct($config = array())
 {
     // call parent, doing main construct job
     parent::__construct($config);
     // attach appropriate adapter
     $this->_opType = strtolower(JRequest::getCmd('optype'));
     //ex : 'import'
     $this->_opSubject = strtolower(JRequest::getCmd('opsubject'));
     // ex:  pageids
     // update context
     $this->_context .= '.' . $this->_opType . '.' . $this->_opSubject;
     // create adapter object
     $adapterName = 'Sh404sefAdapter' . ucfirst($this->_opType) . $this->_opSubject;
     if (!class_exists($adapterName)) {
         $this->_fail('COM_SH404SEF_INVALID_WIZARD_ADAPTER');
     } else {
         $this->_adapter = new $adapterName($this);
     }
     // collect properties from adapter
     $properties = $this->_adapter->setup();
     // and store them
     foreach ($properties as $key => $value) {
         $this->{$key} = $value;
     }
 }
Exemple #2
0
 function info()
 {
     // Set the default view name in case it's missing
     $this->_setDefaults();
     // set the layout for info display
     JRequest::setVar('layout', 'info');
     // default display
     parent::display();
 }