Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function setConfig(array $config = array(), $clean_timings = true)
 {
     parent::setConfig(array_merge(array('class' => 'modResource', 'limit' => 10, 'sortby' => '', 'sortdir' => '', 'groupby' => '', 'totalVar' => 'total', 'tpl' => '', 'return' => 'chunks', 'select' => '', 'leftJoin' => '', 'rightJoin' => '', 'innerJoin' => '', 'includeTVs' => '', 'tvPrefix' => '', 'tvsJoin' => array(), 'tvsSelect' => array(), 'tvFiltersAndDelimiter' => ',', 'tvFiltersOrDelimiter' => '||', 'additionalPlaceholders' => '', 'useWeblinkUrl' => false, 'scheme' => -1), $config), $clean_timings);
     if (empty($this->config['class'])) {
         $this->config['class'] = 'modResource';
     }
     $this->loadModels();
     $this->ancestry = $this->modx->getAncestry($this->config['class']);
     $pk = $this->modx->getPK($this->config['class']);
     $this->pk = is_array($pk) ? implode(',', $pk) : $pk;
     $this->idx = !empty($this->config['offset']) ? (int) $this->config['offset'] + 1 : 1;
 }