Beispiel #1
0
 /**
  * Constructor
  *
  * @param   array              $config    An array of configuration options (name, state, dbo, table_path, ignore_request).
  * @param   JoomlaContainer    $container Service container.
  * @param   \JRegistry         $state     The model state.
  * @param   \JDatabaseDriver   $db        The database adapter.
  */
 public function __construct($config = array(), JoomlaContainer $container = null, \JRegistry $state = null, \JDatabaseDriver $db = null)
 {
     parent::__construct($config, $container, $state, $db);
     if (!$this->reorderConditions) {
         $this->reorderConditions = \JArrayHelper::getValue($config, 'reorder_conditions', array('catid'));
     }
     // Guess the item view as the context.
     if (empty($this->viewItem)) {
         $this->viewItem = $this->getName();
     }
     // Guess the list view as the plural of the item view.
     if (empty($this->viewList)) {
         $inflector = \JStringInflector::getInstance();
         $this->viewList = $inflector->toPlural($this->viewItem);
     }
 }