public function loadPathData($id)
{
$pathData = array();
while ($id != 0) {
/** @var $query \eZ\Publish\Core\Persistence\Database\SelectQuery */
$query = $this->dbHandler->createSelectQuery();
$query->select($this->dbHandler->quoteColumn('parent'), $this->dbHandler->quoteColumn('lang_mask'), $this->dbHandler->quoteColumn('text'))->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();
$rows = $statement->fetchAll(\PDO::FETCH_ASSOC);
if (empty($rows)) {
// Normally this should never happen
// @todo remove throw when tested
$path = implode('/', $pathData);
throw new \RuntimeException("Path ({$path}...) is broken, last id is '{$id}': " . __METHOD__);
}
$id = $rows[0]['parent'];
array_unshift($pathData, $rows);
}
return $pathData;
}