Short description of method getColumn

@access public
@author Cédric Alfonsi, <cedric.alfonsi@tudor.lu>
@param  string id
@return tao_helpers_grid_Column
962363
public function getColumn($id)
    {
        $returnValue = null;

        
		if(isset($this->columns[$id]) && $this->columns[$id] instanceof tao_helpers_grid_Column){
			$returnValue = $this->columns[$id];
		}
        

        return $returnValue;
    }
346304
public static function find($id, array $columns = [])
    {
        $model = static::getInstance();
        $key   = static::getModelKey($id, $model);
        $query = [
            'ConsistentRead' => true,
            'TableName'      => $model->getTable(),
            'Key'            => $key,
        ];
        if ( ! empty( $columns )) {
            $query['AttributesToGet'] = $columns;
        }
        $item = $model->client->getItem($query);
        $item = array_get($item->toArray(), 'Item');
        if (empty( $item )) {
            return null;
        }
        $item = $model->unmarshalItem($item);
        $model->fill($item);
        // Set the model id field.
        $model->setId($id);
        $model->exists = true;
        $model->syncOriginal();

        return $model;
    }
777860
public function get(string $id)
    {
        return isset($this->columns[$id]) ? $this->columns[$id] : false;
    }
87943
public function find($id, $columns = ['*'])
    {
        if (Uuid::validate($id)) {
            return $this->findByUuid($id, $columns);
        } else {
            return parent::find($id, $columns);
        }
    }
1141912
public function get($id)
    {
        if(!is_string($id))
        {
            throw new ContainerException('id is not a string value');
        }
        if('' === $id)
        {
            throw new ContainerException('id can not be a empty string value');
        }
        
        // 实现传递实例化参数
        $params = func_get_args();
        array_shift($params);
        // 单例中有数据，且无实例化参数时直接返回单例
        if(isset($this->singletonObjects[$id]) && !isset($params[0]))
        {
            return $this->singletonObjects[$id];
        }
        $data = $this->beanParser->getData();
        
        if(isset($data[$id]))
        {
            $object = BeanFactory::newInstance($data[$id]['className'], ...$params);
        }
        else if(class_exists($id))
        {
            $object = BeanFactory::newInstance($id, ...$params);
        }
        else
        {
            throw new ContainerException(sprintf('%s not found', $id));
        }

        // 传参实例化强制不使用单例
        if([] === $params && isset($data[$id]['instanceType']) && $data[$id]['instanceType'] === Bean::INSTANCE_TYPE_SINGLETON)
        {
            $this->singletonObjects[$id] = $object;
        }
        return $object;
    }
824732
public function where_id_is($id)
        {
            return (Arrays::is($this->_getIdColumnName())) ?
                $this->where($this->_getCompoundIdColumnValues($id), null) :
                $this->where($this->_getIdColumnName(), $id);
        }
1231471
public function getPdf($id = '')
	{
		$id = $id ? : $this->attributes[$this->primary_column];
		return $this->request('GET', sprintf('%s/%s', $this->getUrl(), $id), array(), "", "pdf");
	}
568838
public function getColumn($index)
    {
        if (is_string($index) and in_array($index, $this->childNodesEntities)) {
            if (false !== ($key = array_search($index, $this->childNodesEntities))) {
                if ($this->childNodes->offsetExists($key)) {
                    $index = $key;
                }
            }
        }

        return $this->childNodes->offsetGet($index);
    }
1370767
public function selectById($id)
	{
		$sql = "SELECT * FROM `$this->tableName` WHERE `$this->pkColName` = %d ";
		$stmt = $this->pdo->prepare(sprintf($sql, $id));
		$res = $stmt->execute();

		if ($res === false) {
			return null;
		}

		$rows = $stmt->fetchAll();

		if (count($rows) !== 1) {
			return null;
		}

		return $this->prepareEntity($rows[0]);
	}
1021825
public function getGridColumn($columns=null) {
		if($columns !== null) {
			foreach($columns as $val) {
				/*
				if(trim($val) == 'enabled') {
					$this->defaultColumns[] = array(
						'name'  => 'enabled',
						'value' => '$data->enabled == 1? "Ya": "Tidak"',
					);
				}
				*/
				$this->defaultColumns[] = $val;
			}
		} else {
			//$this->defaultColumns[] = 'comment_id';
			$this->defaultColumns[] = 'publish';
			$this->defaultColumns[] = 'parent_id';
			$this->defaultColumns[] = 'wall_id';
			$this->defaultColumns[] = 'user_id';
			$this->defaultColumns[] = 'comment';
			$this->defaultColumns[] = 'creation_date';
			$this->defaultColumns[] = 'modified_date';
		}

		return $this->defaultColumns;
	}
1027799
public static function find($id, $columns = array('*'))
    {
        $key = (new static)->getKeyName();
        if (ctype_print($id)) {
            $idFinal = (property_exists(static::class, 'uuidOptimization') && static::$uuidOptimization)
            ? self::toOptimized($id) : hex2bin($id);

            return static::where($key, '=', $idFinal)->first($columns);
        } else {
            return parent::where($key, '=', $id)->first($columns);
        }
    }
879535
public function addColumn($id, $title, $options = array())
    {
        $returnValue = null;

        
		$replace = false;
		if(isset($options['replace'])){
			$replace = $options['replace'];
			unset($options['replace']);
		}
		if(!$replace && isset($this->columns[$id])){
			throw new common_Exception('the column with the id '.$id.' already exists');
		}else{
			$this->columns[$id] = new tao_helpers_grid_Column($id, $title, $options);
			//set order as well:
			$returnValue = true;
		}
        

        return $returnValue;
    }
1091337
public function getColumn($name)
    {
        return isset($this->columns[$name]) ? $this->columns[$name] : false;
    }
772210
public function getById($id)
    {
        $model = $this
            ->prepareQuery()
            ->where($this->model->getTable() . '.id', $id)
            ->first();

        if (empty($model))
            return null;

        $model = $this->addPermissionsForModel($model);

        return $this->formatModel($model);
    }
1036355
public function read($id)
    {
        $sql = 'SELECT ' . $this->config['dataColumn'] . ' FROM ' . $this->config['name']
            . ' WHERE ' . $this->config['primary'] . ' = ?'
            . ' AND ' . $this->config['modifiedColumn'] . ' + ' . $this->config['lifetimeColumn'] . ' >= ?';

        $result = $this->fetchOne($sql, array($id, time()));

        if (!$result) {
            $result = '';
        }

        return $result;
    }
280627
public function getColumnId( $column )
    {
        if ( $this->getColumnsUseTranslation() )
        {
            $translatePrefix    = $this->getColumnTranslatePrefix();
            $translatePostfix   = $this->getColumnTranslatePostfix();

            $column = ( empty( $translatePrefix )
                        ? '' : $translatePrefix . '.' ) .
                      $column .
                      ( empty( $translatePostfix )
                        ? '' : '.' . $translatePostfix );
        }

        return $column;
    }
1277800
public function column_check( $id = false, $column = false )
	{
		$sql = "SELECT COLUMN_CHECK($column) FROM `{$this->table}` WHERE id = :id";
		$params = [ ':id' => $id ];

		return $this->select_one( $sql, $params );
	}