| @@ 81-101 (lines=21) @@ | ||
| 78 | * |
|
| 79 | * @return array |
|
| 80 | */ |
|
| 81 | public function loadObjectStateDataByIdentifier($identifier, $groupId) |
|
| 82 | { |
|
| 83 | $query = $this->createObjectStateFindQuery(); |
|
| 84 | $query->where( |
|
| 85 | $query->expr->lAnd( |
|
| 86 | $query->expr->eq( |
|
| 87 | $this->dbHandler->quoteColumn('identifier', 'ezcobj_state'), |
|
| 88 | $query->bindValue($identifier, null, \PDO::PARAM_STR) |
|
| 89 | ), |
|
| 90 | $query->expr->eq( |
|
| 91 | $this->dbHandler->quoteColumn('group_id', 'ezcobj_state'), |
|
| 92 | $query->bindValue($groupId, null, \PDO::PARAM_INT) |
|
| 93 | ) |
|
| 94 | ) |
|
| 95 | ); |
|
| 96 | ||
| 97 | $statement = $query->prepare(); |
|
| 98 | $statement->execute(); |
|
| 99 | ||
| 100 | return $statement->fetchAll(\PDO::FETCH_ASSOC); |
|
| 101 | } |
|
| 102 | ||
| 103 | /** |
|
| 104 | * Loads data for all object states belonging to group with $groupId ID. |
|
| @@ 1129-1148 (lines=20) @@ | ||
| 1126 | * |
|
| 1127 | * @return array |
|
| 1128 | */ |
|
| 1129 | public function loadVersionInfo($contentId, $versionNo) |
|
| 1130 | { |
|
| 1131 | $query = $this->queryBuilder->createVersionInfoFindQuery(); |
|
| 1132 | $query->where( |
|
| 1133 | $query->expr->lAnd( |
|
| 1134 | $query->expr->eq( |
|
| 1135 | $this->dbHandler->quoteColumn('contentobject_id', 'ezcontentobject_version'), |
|
| 1136 | $query->bindValue($contentId, null, \PDO::PARAM_INT) |
|
| 1137 | ), |
|
| 1138 | $query->expr->eq( |
|
| 1139 | $this->dbHandler->quoteColumn('version', 'ezcontentobject_version'), |
|
| 1140 | $query->bindValue($versionNo, null, \PDO::PARAM_INT) |
|
| 1141 | ) |
|
| 1142 | ) |
|
| 1143 | ); |
|
| 1144 | $statement = $query->prepare(); |
|
| 1145 | $statement->execute(); |
|
| 1146 | ||
| 1147 | return $statement->fetchAll(\PDO::FETCH_ASSOC); |
|
| 1148 | } |
|
| 1149 | ||
| 1150 | /** |
|
| 1151 | * Returns data for all versions with given status created by the given $userId. |
|