src/Utility/Search.php
public function getSelectClause(array $data): array
    {
        if (empty($data['display_columns'])) {
            return [];
        }

        $result = (array)$data['display_columns'];
        foreach ((array)$this->table->getPrimaryKey() as $primaryKey) {
            $primaryKey = $this->table->aliasField($primaryKey);
            if (! in_array($primaryKey, $result)) {
                array_unshift($result, $primaryKey);
            }
        }

        $result = $this->filterFields($result);

        return $result;
    }
public function getSelectClause(array $data): array
    {
        if (empty($data['display_columns'])) {
            return [];
        }

        $result = (array)$data['display_columns'];
        foreach ((array)$this->table->getPrimaryKey() as $primaryKey) {
            $primaryKey = $this->table->aliasField($primaryKey);
            if (! in_array($primaryKey, $result)) {
                array_unshift($result, $primaryKey);
            }
        }

        $result = $this->filterFields($result);

        return $result;
    }
public function getSelectClause ( array $ data ) : array { if ( empty ( $ data [ 'display_columns' ] ) ) { return [ ] ; } $ result = ( array ) $ data [ 'display_columns' ] ; foreach ( ( array ) $ this -> table -> getPrimaryKey ( ) as $ primaryKey ) { $ primaryKey = $ this -> table -> aliasField ( $ primaryKey ) ; if ( ! in_array ( $ primaryKey , $ result ) ) { array_unshift ( $ result , $ primaryKey ) ; } } $ result = $ this -> filterFields ( $ result ) ; return $ result ; }
Get fields for Query's select statement.

@param  mixed[] $data request data
@return string[]
Get fields for Query s select statement .