Pimcore\Model\Translation\AbstractTranslation\Listing\Dao::getTotalCount PHP Method

getTotalCount() public method

public getTotalCount ( ) : integer
return integer
    public function getTotalCount()
    {
        $select = $this->db->select();
        $select->from([static::getTableName()], static::getTableName() . ".key");
        $this->addConditions($select);
        $this->addGroupBy($select);
        if ($this->onCreateQueryCallback) {
            $closure = $this->onCreateQueryCallback;
            $closure($select);
        }
        $query = "SELECT COUNT(*) as amount FROM ({$select}) AS a";
        $amount = (int) $this->db->fetchOne($query, $this->model->getConditionVariables());
        return $amount;
    }