| @@ 129-144 (lines=16) @@ | ||
| 126 | * |
|
| 127 | * @return string[][] |
|
| 128 | */ |
|
| 129 | public function loadAllSectionData() |
|
| 130 | { |
|
| 131 | $query = $this->dbHandler->createSelectQuery(); |
|
| 132 | $query->select( |
|
| 133 | $this->dbHandler->quoteColumn('id'), |
|
| 134 | $this->dbHandler->quoteColumn('identifier'), |
|
| 135 | $this->dbHandler->quoteColumn('name') |
|
| 136 | )->from( |
|
| 137 | $this->dbHandler->quoteTable('ezsection') |
|
| 138 | ); |
|
| 139 | ||
| 140 | $statement = $query->prepare(); |
|
| 141 | $statement->execute(); |
|
| 142 | ||
| 143 | return $statement->fetchAll(\PDO::FETCH_ASSOC); |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * Loads data for section with $identifier. |
|
| @@ 287-300 (lines=14) @@ | ||
| 284 | * |
|
| 285 | * @param int $id |
|
| 286 | */ |
|
| 287 | public function deleteSection($id) |
|
| 288 | { |
|
| 289 | $query = $this->dbHandler->createDeleteQuery(); |
|
| 290 | $query->deleteFrom( |
|
| 291 | $this->dbHandler->quoteTable('ezsection') |
|
| 292 | )->where( |
|
| 293 | $query->expr->eq( |
|
| 294 | $this->dbHandler->quoteColumn('id'), |
|
| 295 | $query->bindValue($id, null, \PDO::PARAM_INT) |
|
| 296 | ) |
|
| 297 | ); |
|
| 298 | ||
| 299 | $query->prepare()->execute(); |
|
| 300 | } |
|
| 301 | ||
| 302 | /** |
|
| 303 | * Inserts the assignment of $contentId to $sectionId. |
|
| @@ 95-108 (lines=14) @@ | ||
| 92 | * |
|
| 93 | * @param mixed $id |
|
| 94 | */ |
|
| 95 | public function deleteUrlWildcard($id) |
|
| 96 | { |
|
| 97 | /** @var $query \eZ\Publish\Core\Persistence\Database\DeleteQuery */ |
|
| 98 | $query = $this->dbHandler->createDeleteQuery(); |
|
| 99 | $query->deleteFrom( |
|
| 100 | $this->dbHandler->quoteTable('ezurlwildcard') |
|
| 101 | )->where( |
|
| 102 | $query->expr->eq( |
|
| 103 | $this->dbHandler->quoteColumn('id'), |
|
| 104 | $query->bindValue($id, null, \PDO::PARAM_INT) |
|
| 105 | ) |
|
| 106 | ); |
|
| 107 | $query->prepare()->execute(); |
|
| 108 | } |
|
| 109 | ||
| 110 | /** |
|
| 111 | * Loads an array with data about UrlWildcard with $id. |
|
| @@ 402-417 (lines=16) @@ | ||
| 399 | * |
|
| 400 | * @param string $hash |
|
| 401 | */ |
|
| 402 | public function expireUserToken($hash) |
|
| 403 | { |
|
| 404 | $query = $this->handler->createUpdateQuery(); |
|
| 405 | $query |
|
| 406 | ->update($this->handler->quoteTable('ezuser_accountkey')) |
|
| 407 | ->set( |
|
| 408 | $this->handler->quoteColumn('time'), |
|
| 409 | $query->bindValue(0) |
|
| 410 | )->where( |
|
| 411 | $query->expr->eq( |
|
| 412 | $this->handler->quoteColumn('hash_key'), |
|
| 413 | $query->bindValue($hash, null, \PDO::PARAM_STR) |
|
| 414 | ) |
|
| 415 | ); |
|
| 416 | $query->prepare()->execute(); |
|
| 417 | } |
|
| 418 | ||
| 419 | /** |
|
| 420 | * Assigns role to user with given limitation. |
|
| @@ 193-206 (lines=14) @@ | ||
| 190 | * |
|
| 191 | * @param int $id |
|
| 192 | */ |
|
| 193 | public function deleteLanguage($id) |
|
| 194 | { |
|
| 195 | $query = $this->dbHandler->createDeleteQuery(); |
|
| 196 | $query->deleteFrom( |
|
| 197 | $this->dbHandler->quoteTable('ezcontent_language') |
|
| 198 | )->where( |
|
| 199 | $query->expr->eq( |
|
| 200 | $this->dbHandler->quoteColumn('id'), |
|
| 201 | $query->bindValue($id, null, \PDO::PARAM_INT) |
|
| 202 | ) |
|
| 203 | ); |
|
| 204 | ||
| 205 | $query->prepare()->execute(); |
|
| 206 | } |
|
| 207 | ||
| 208 | /** |
|
| 209 | * Check whether a language may be deleted. |
|
| @@ 371-384 (lines=14) @@ | ||
| 368 | * |
|
| 369 | * @param int $stateId |
|
| 370 | */ |
|
| 371 | public function deleteObjectStateLinks($stateId) |
|
| 372 | { |
|
| 373 | $query = $this->dbHandler->createDeleteQuery(); |
|
| 374 | $query->deleteFrom( |
|
| 375 | $this->dbHandler->quoteTable('ezcobj_state_link') |
|
| 376 | )->where( |
|
| 377 | $query->expr->eq( |
|
| 378 | $this->dbHandler->quoteColumn('contentobject_state_id'), |
|
| 379 | $query->bindValue($stateId, null, \PDO::PARAM_INT) |
|
| 380 | ) |
|
| 381 | ); |
|
| 382 | ||
| 383 | $query->prepare()->execute(); |
|
| 384 | } |
|
| 385 | ||
| 386 | /** |
|
| 387 | * Inserts a new object state group into database. |
|
| @@ 765-778 (lines=14) @@ | ||
| 762 | * |
|
| 763 | * @param mixed $stateId |
|
| 764 | */ |
|
| 765 | protected function deleteObjectStateTranslations($stateId) |
|
| 766 | { |
|
| 767 | $query = $this->dbHandler->createDeleteQuery(); |
|
| 768 | $query->deleteFrom( |
|
| 769 | $this->dbHandler->quoteTable('ezcobj_state_language') |
|
| 770 | )->where( |
|
| 771 | $query->expr->eq( |
|
| 772 | $this->dbHandler->quoteColumn('contentobject_state_id'), |
|
| 773 | $query->bindValue($stateId, null, \PDO::PARAM_INT) |
|
| 774 | ) |
|
| 775 | ); |
|
| 776 | ||
| 777 | $query->prepare()->execute(); |
|
| 778 | } |
|
| 779 | ||
| 780 | /** |
|
| 781 | * Inserts object state group translations into database. |
|
| @@ 822-835 (lines=14) @@ | ||
| 819 | * |
|
| 820 | * @param mixed $groupId |
|
| 821 | */ |
|
| 822 | protected function deleteObjectStateGroupTranslations($groupId) |
|
| 823 | { |
|
| 824 | $query = $this->dbHandler->createDeleteQuery(); |
|
| 825 | $query->deleteFrom( |
|
| 826 | $this->dbHandler->quoteTable('ezcobj_state_group_language') |
|
| 827 | )->where( |
|
| 828 | $query->expr->eq( |
|
| 829 | $this->dbHandler->quoteColumn('contentobject_state_group_id'), |
|
| 830 | $query->bindValue($groupId, null, \PDO::PARAM_INT) |
|
| 831 | ) |
|
| 832 | ); |
|
| 833 | ||
| 834 | $query->prepare()->execute(); |
|
| 835 | } |
|
| 836 | } |
|
| 837 | ||
| @@ 1026-1041 (lines=16) @@ | ||
| 1023 | * @param mixed $contentId |
|
| 1024 | * @param mixed $versionNo |
|
| 1025 | */ |
|
| 1026 | public function updateLocationsContentVersionNo($contentId, $versionNo) |
|
| 1027 | { |
|
| 1028 | $query = $this->handler->createUpdateQuery(); |
|
| 1029 | $query->update( |
|
| 1030 | $this->handler->quoteTable('ezcontentobject_tree') |
|
| 1031 | )->set( |
|
| 1032 | $this->handler->quoteColumn('contentobject_version'), |
|
| 1033 | $query->bindValue($versionNo, null, \PDO::PARAM_INT) |
|
| 1034 | )->where( |
|
| 1035 | $query->expr->eq( |
|
| 1036 | $this->handler->quoteColumn('contentobject_id'), |
|
| 1037 | $contentId |
|
| 1038 | ) |
|
| 1039 | ); |
|
| 1040 | $query->prepare()->execute(); |
|
| 1041 | } |
|
| 1042 | ||
| 1043 | /** |
|
| 1044 | * Searches for the main nodeId of $contentId in $versionId. |
|