/**
  * Adds to the internal table-to-column mapping array.
  *
  * @param  string $tbl The table/join the columns come from.
  * @param  array|string $cols The list of columns; preferably as
  * an array, but possibly as a string containing one column.
  * @param  bool|string True if it should be prepended, a correlation name if it should be inserted
  * @return void
  */
 protected function _tableCols($correlationName, $cols, $afterCorrelationName = null)
 {
     if (!is_array($cols)) {
         $cols = array($cols);
     }
     foreach ($cols as $k => $v) {
         if ($v instanceof Varien_Db_Select) {
             $cols[$k] = new Zend_Db_Expr(sprintf('(%s)', $v->assemble()));
         }
     }
     return parent::_tableCols($correlationName, $cols, $afterCorrelationName);
 }
Пример #2
0
 /**
  * Adds to the internal table-to-column mapping array.
  *
  * @param  string $tbl The table/join the columns come from.
  * @param  array|string $cols The list of columns; preferably as
  * an array, but possibly as a string containing one column.
  * @return void
  */
 protected function _tableCols($correlationName, $cols)
 {
     // allow us to pass empty columns in joining so that we can add columns later.
     if (!is_null($cols)) {
         parent::_tableCols($correlationName, $cols);
     }
 }