|
@@ 153-166 (lines=14) @@
|
| 150 |
|
* |
| 151 |
|
* @return array The URL rewrites |
| 152 |
|
*/ |
| 153 |
|
public function findAllByEntityTypeAndEntityId($entityType, $entityId) |
| 154 |
|
{ |
| 155 |
|
|
| 156 |
|
// initialize the params |
| 157 |
|
$params = array( |
| 158 |
|
MemberNames::ENTITY_TYPE => $entityType, |
| 159 |
|
MemberNames::ENTITY_ID => $entityId |
| 160 |
|
); |
| 161 |
|
|
| 162 |
|
// load and return the URL rewrites |
| 163 |
|
foreach ($this->getFinder(SqlStatementKeys::URL_REWRITES_BY_ENTITY_TYPE_AND_ENTITY_ID)->find($params) as $result) { |
| 164 |
|
yield $result; |
| 165 |
|
} |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
/** |
| 169 |
|
* Return's an array with the URL rewrites for the passed entity type, entity and store ID. |
|
@@ 177-191 (lines=15) @@
|
| 174 |
|
* |
| 175 |
|
* @return array The URL rewrites |
| 176 |
|
*/ |
| 177 |
|
public function findAllByEntityTypeAndEntityIdAndStoreId($entityType, $entityId, $storeId) |
| 178 |
|
{ |
| 179 |
|
|
| 180 |
|
// initialize the params |
| 181 |
|
$params = array( |
| 182 |
|
MemberNames::ENTITY_TYPE => $entityType, |
| 183 |
|
MemberNames::ENTITY_ID => $entityId, |
| 184 |
|
MemberNames::STORE_ID => $storeId |
| 185 |
|
); |
| 186 |
|
|
| 187 |
|
// load and return the URL rewrites |
| 188 |
|
foreach ($this->getFinder(SqlStatementKeys::URL_REWRITES_BY_ENTITY_TYPE_AND_ENTITY_ID_AND_STORE_ID)->find($params) as $result) { |
| 189 |
|
yield $result; |
| 190 |
|
} |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
/** |
| 194 |
|
* Load's and return's the URL rewrite for the given request path and store ID. |