예제 #1
0
 /**
  * Set column
  *
  * @param string $key
  * @param string $name
  * @return \Egnine\Crud\Container\Form\Mysql
  */
 public function setColumn($key, $name)
 {
     if (isset($this->_columns[$key])) {
         return $this;
     }
     $this->_columns[$key] = $name;
     if (null !== $this->_dataSource) {
         $this->_dataSource->setColumn($name, $key);
     }
     return $this;
 }
예제 #2
0
 /**
  * Set column
  * 
  * @param string $key
  * @param string $name
  * @param boolean $useTableAlias
  * @param boolean $useCorrelationTableName
  * @return \Engine\Crud\Container\Grid\Mysql
  */
 public function setColumn($key, $name, $useTableAlias = true, $useCorrelationTableName = false)
 {
     if (isset($this->_columns[$key])) {
         return $this;
     }
     $this->_columns[$key] = [$name, 'useTableAlias' => $useTableAlias, 'useCorrelationName' => $useCorrelationTableName];
     if (null !== $this->_dataSource) {
         $this->_dataSource->setColumn($name, $key, $useTableAlias, $useCorrelationTableName);
     }
     return $this;
 }