| @@ 9-32 (lines=24) @@ | ||
| 6 | use Magium\Navigators\InstructionNavigator; |
|
| 7 | use Magium\Navigators\StaticNavigatorInterface; |
|
| 8 | ||
| 9 | class Cart implements StaticNavigatorInterface |
|
| 10 | { |
|
| 11 | ||
| 12 | const NAVIGATOR = 'Cart\Cart'; |
|
| 13 | ||
| 14 | protected $instructionNavigator; |
|
| 15 | protected $theme; |
|
| 16 | ||
| 17 | public function __construct( |
|
| 18 | InstructionNavigator $instructionNavigator, |
|
| 19 | AbstractThemeConfiguration $themeConfiguration |
|
| 20 | ) |
|
| 21 | { |
|
| 22 | $this->instructionNavigator = $instructionNavigator; |
|
| 23 | $this->theme = $themeConfiguration; |
|
| 24 | } |
|
| 25 | ||
| 26 | public function navigateTo() |
|
| 27 | { |
|
| 28 | $instructions = $this->theme->getCartNavigationInstructions(); |
|
| 29 | $this->instructionNavigator->navigateTo($instructions); |
|
| 30 | } |
|
| 31 | ||
| 32 | } |
|
| @@ 9-34 (lines=26) @@ | ||
| 6 | use Magium\Navigators\InstructionNavigator; |
|
| 7 | use Magium\Navigators\StaticNavigatorInterface; |
|
| 8 | ||
| 9 | class Registration implements StaticNavigatorInterface |
|
| 10 | { |
|
| 11 | ||
| 12 | const NAVIGATOR = 'Customer\Registration'; |
|
| 13 | ||
| 14 | protected $instructionNavigator; |
|
| 15 | protected $theme; |
|
| 16 | ||
| 17 | public function __construct( |
|
| 18 | InstructionNavigator $instructionNavigator, |
|
| 19 | AbstractThemeConfiguration $abstractThemeConfiguration |
|
| 20 | ) |
|
| 21 | { |
|
| 22 | $this->instructionNavigator = $instructionNavigator; |
|
| 23 | $this->theme = $abstractThemeConfiguration; |
|
| 24 | } |
|
| 25 | ||
| 26 | ||
| 27 | public function navigateTo() |
|
| 28 | { |
|
| 29 | $this->instructionNavigator->navigateTo( |
|
| 30 | $this->theme->getRegistrationNavigationInstructions() |
|
| 31 | ); |
|
| 32 | } |
|
| 33 | ||
| 34 | } |
|