|
@@ 246-259 (lines=14) @@
|
| 243 |
|
* |
| 244 |
|
* @return array The URL rewrites |
| 245 |
|
*/ |
| 246 |
|
public function findAllByEntityTypeAndEntityId($entityType, $entityId) |
| 247 |
|
{ |
| 248 |
|
|
| 249 |
|
// initialize the params |
| 250 |
|
$params = array( |
| 251 |
|
MemberNames::ENTITY_TYPE => $entityType, |
| 252 |
|
MemberNames::ENTITY_ID => $entityId |
| 253 |
|
); |
| 254 |
|
|
| 255 |
|
// load and return the URL rewrites |
| 256 |
|
foreach ($this->getFinder(SqlStatementKeys::URL_REWRITES_BY_ENTITY_TYPE_AND_ENTITY_ID)->find($params) as $result) { |
| 257 |
|
yield $result; |
| 258 |
|
} |
| 259 |
|
} |
| 260 |
|
|
| 261 |
|
/** |
| 262 |
|
* Return's an array with the URL rewrites for the passed entity type, entity and store ID. |
|
@@ 270-284 (lines=15) @@
|
| 267 |
|
* |
| 268 |
|
* @return array The URL rewrites |
| 269 |
|
*/ |
| 270 |
|
public function findAllByEntityTypeAndEntityIdAndStoreId($entityType, $entityId, $storeId) |
| 271 |
|
{ |
| 272 |
|
|
| 273 |
|
// initialize the params |
| 274 |
|
$params = array( |
| 275 |
|
MemberNames::ENTITY_TYPE => $entityType, |
| 276 |
|
MemberNames::ENTITY_ID => $entityId, |
| 277 |
|
MemberNames::STORE_ID => $storeId |
| 278 |
|
); |
| 279 |
|
|
| 280 |
|
// load and return the URL rewrites |
| 281 |
|
foreach ($this->getFinder(SqlStatementKeys::URL_REWRITES_BY_ENTITY_TYPE_AND_ENTITY_ID_AND_STORE_ID)->find($params) as $result) { |
| 282 |
|
yield $result; |
| 283 |
|
} |
| 284 |
|
} |
| 285 |
|
|
| 286 |
|
/** |
| 287 |
|
* Load's and return's the URL rewrite for the given request path and store ID. |