| @@ 79-99 (lines=21) @@ | ||
| 76 | * |
|
| 77 | * @return array |
|
| 78 | */ |
|
| 79 | public function loadObjectStateDataByIdentifier($identifier, $groupId) |
|
| 80 | { |
|
| 81 | $query = $this->createObjectStateFindQuery(); |
|
| 82 | $query->where( |
|
| 83 | $query->expr->lAnd( |
|
| 84 | $query->expr->eq( |
|
| 85 | $this->dbHandler->quoteColumn('identifier', 'ezcobj_state'), |
|
| 86 | $query->bindValue($identifier, null, \PDO::PARAM_STR) |
|
| 87 | ), |
|
| 88 | $query->expr->eq( |
|
| 89 | $this->dbHandler->quoteColumn('group_id', 'ezcobj_state'), |
|
| 90 | $query->bindValue($groupId, null, \PDO::PARAM_INT) |
|
| 91 | ) |
|
| 92 | ) |
|
| 93 | ); |
|
| 94 | ||
| 95 | $statement = $query->prepare(); |
|
| 96 | $statement->execute(); |
|
| 97 | ||
| 98 | return $statement->fetchAll(\PDO::FETCH_ASSOC); |
|
| 99 | } |
|
| 100 | ||
| 101 | /** |
|
| 102 | * Loads data for all object states belonging to group with $groupId ID. |
|
| @@ 940-959 (lines=20) @@ | ||
| 937 | * |
|
| 938 | * @return array |
|
| 939 | */ |
|
| 940 | public function loadVersionInfo($contentId, $versionNo) |
|
| 941 | { |
|
| 942 | $query = $this->queryBuilder->createVersionInfoFindQuery(); |
|
| 943 | $query->where( |
|
| 944 | $query->expr->lAnd( |
|
| 945 | $query->expr->eq( |
|
| 946 | $this->dbHandler->quoteColumn('contentobject_id', 'ezcontentobject_version'), |
|
| 947 | $query->bindValue($contentId, null, \PDO::PARAM_INT) |
|
| 948 | ), |
|
| 949 | $query->expr->eq( |
|
| 950 | $this->dbHandler->quoteColumn('version', 'ezcontentobject_version'), |
|
| 951 | $query->bindValue($versionNo, null, \PDO::PARAM_INT) |
|
| 952 | ) |
|
| 953 | ) |
|
| 954 | ); |
|
| 955 | $statement = $query->prepare(); |
|
| 956 | $statement->execute(); |
|
| 957 | ||
| 958 | return $statement->fetchAll(\PDO::FETCH_ASSOC); |
|
| 959 | } |
|
| 960 | ||
| 961 | /** |
|
| 962 | * Returns data for all versions with given status created by the given $userId. |
|
| @@ 895-914 (lines=20) @@ | ||
| 892 | * |
|
| 893 | * @return array Data rows. |
|
| 894 | */ |
|
| 895 | public function loadTypeData($typeId, $status) |
|
| 896 | { |
|
| 897 | $q = $this->getLoadTypeQuery(); |
|
| 898 | $q->where( |
|
| 899 | $q->expr->lAnd( |
|
| 900 | $q->expr->eq( |
|
| 901 | $this->dbHandler->quoteColumn('id', 'ezcontentclass'), |
|
| 902 | $q->bindValue($typeId, null, \PDO::PARAM_INT) |
|
| 903 | ), |
|
| 904 | $q->expr->eq( |
|
| 905 | $this->dbHandler->quoteColumn('version', 'ezcontentclass'), |
|
| 906 | $q->bindValue($status, null, \PDO::PARAM_INT) |
|
| 907 | ) |
|
| 908 | ) |
|
| 909 | ); |
|
| 910 | $stmt = $q->prepare(); |
|
| 911 | $stmt->execute(); |
|
| 912 | ||
| 913 | return $stmt->fetchAll(\PDO::FETCH_ASSOC); |
|
| 914 | } |
|
| 915 | ||
| 916 | /** |
|
| 917 | * Loads an array with data about the type referred to by $identifier in |
|