eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase::loadAutogeneratedEntries PHP Method

loadAutogeneratedEntries() public method

Loads all autogenerated entries with given $parentId with optionally included history entries.
public loadAutogeneratedEntries ( mixed $parentId, boolean $includeHistory = false ) : array
$parentId mixed
$includeHistory boolean
return array
    public function loadAutogeneratedEntries($parentId, $includeHistory = false)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\SelectQuery */
        $query = $this->dbHandler->createSelectQuery();
        $query->select('*')->from($this->dbHandler->quoteTable($this->table))->where($query->expr->lAnd($query->expr->eq($this->dbHandler->quoteColumn('parent'), $query->bindValue($parentId, null, \PDO::PARAM_INT)), $query->expr->eq($this->dbHandler->quoteColumn('action_type'), $query->bindValue('eznode', null, \PDO::PARAM_STR)), $query->expr->eq($this->dbHandler->quoteColumn('is_alias'), $query->bindValue(0, null, \PDO::PARAM_INT))));
        if (!$includeHistory) {
            $query->where($query->expr->eq($this->dbHandler->quoteColumn('is_original'), $query->bindValue(1, null, \PDO::PARAM_INT)));
        }
        $statement = $query->prepare();
        $statement->execute();
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }