|
@@ 1430-1442 (lines=13) @@
|
| 1427 |
|
return null; |
| 1428 |
|
} |
| 1429 |
|
|
| 1430 |
|
public function saveApplicationComponent($slug, $postValues) |
| 1431 |
|
{ |
| 1432 |
|
$newApplicationComponent = $this->createApplicationComponentFromPostValues($postValues); |
| 1433 |
|
|
| 1434 |
|
$applicationComponents = $this->getApplicationComponents(); |
| 1435 |
|
foreach ($applicationComponents as $key => $applicationComponent) { |
| 1436 |
|
if ($applicationComponent->slug == $slug) { |
| 1437 |
|
$applicationComponents[$key] = $newApplicationComponent; |
| 1438 |
|
} |
| 1439 |
|
} |
| 1440 |
|
$this->repository->applicationComponents = $applicationComponents; |
| 1441 |
|
$this->save(); |
| 1442 |
|
} |
| 1443 |
|
|
| 1444 |
|
public function deleteApplicationComponentBySlug($slug) |
| 1445 |
|
{ |
|
@@ 1444-1455 (lines=12) @@
|
| 1441 |
|
$this->save(); |
| 1442 |
|
} |
| 1443 |
|
|
| 1444 |
|
public function deleteApplicationComponentBySlug($slug) |
| 1445 |
|
{ |
| 1446 |
|
$applicationComponents = $this->getApplicationComponents(); |
| 1447 |
|
foreach ($applicationComponents as $key => $applicationComponent) { |
| 1448 |
|
if ($applicationComponent->slug == $slug) { |
| 1449 |
|
unset($applicationComponents[$key]); |
| 1450 |
|
} |
| 1451 |
|
} |
| 1452 |
|
$applicationComponents = array_values($applicationComponents); |
| 1453 |
|
$this->repository->applicationComponents = $applicationComponents; |
| 1454 |
|
$this->save(); |
| 1455 |
|
} |
| 1456 |
|
|
| 1457 |
|
private function getEncodedRepository() |
| 1458 |
|
{ |