eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::setFetchColumns PHP Method

setFetchColumns() protected method

This method is intended to be overwritten by derived classes in order to add additional columns to be fetched from the database. Please do not forget to call the parent when overwriting this method.
protected setFetchColumns ( eZ\Publish\Core\Persistence\Database\SelectQuery $selectQuery, integer $fieldId, integer $versionNo )
$selectQuery eZ\Publish\Core\Persistence\Database\SelectQuery
$fieldId integer
$versionNo integer
    protected function setFetchColumns(SelectQuery $selectQuery, $fieldId, $versionNo)
    {
        $connection = $this->getConnection();
        $selectQuery->select($connection->quoteColumn('filename'), $connection->quoteColumn('mime_type'), $connection->quoteColumn('original_filename'));
    }

Usage Example

 /**
  * Set columns to be fetched from the database
  *
  * This method is intended to be overwritten by derived classes in order to
  * add additional columns to be fetched from the database. Please do not
  * forget to call the parent when overwriting this method.
  *
  * @param eZ\Publish\Core\Persistence\Database\SelectQuery $selectQuery
  * @param int $fieldId
  * @param int $versionNo
  *
  * @return void
  */
 protected function setFetchColumns(SelectQuery $selectQuery, $fieldId, $versionNo)
 {
     $connection = $this->getConnection();
     parent::setFetchColumns($selectQuery, $fieldId, $versionNo);
     $selectQuery->select($connection->quoteColumn('download_count'));
 }
All Usage Examples Of eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::setFetchColumns