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

isRootEntry() public method

Special root entry entry will have parentId=0 and text=''. In standard installation this entry will point to location with id=2.
public isRootEntry ( mixed $id ) : boolean
$id mixed
return boolean
    public function isRootEntry($id)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\SelectQuery */
        $query = $this->dbHandler->createSelectQuery();
        $query->select($this->dbHandler->quoteColumn('text'), $this->dbHandler->quoteColumn('parent'))->from($this->dbHandler->quoteTable($this->table))->where($query->expr->eq($this->dbHandler->quoteColumn('id'), $query->bindValue($id, null, \PDO::PARAM_INT)));
        $statement = $query->prepare();
        $statement->execute();
        $row = $statement->fetch(\PDO::FETCH_ASSOC);
        return strlen($row['text']) == 0 && $row['parent'] == 0;
    }