| @@ 7-42 (lines=36) @@ | ||
| 4 | ||
| 5 | use Sylius\Behat\Page\SymfonyPage; |
|
| 6 | ||
| 7 | class ShowPage extends SymfonyPage implements ShowPageInterface |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * {@inheritdoc} |
|
| 11 | */ |
|
| 12 | public function getBlockContents() |
|
| 13 | { |
|
| 14 | return $this->getElement('block')->getHtml(); |
|
| 15 | } |
|
| 16 | ||
| 17 | /** |
|
| 18 | * {@inheritdoc} |
|
| 19 | */ |
|
| 20 | public function getBlockImageUrl() |
|
| 21 | { |
|
| 22 | return $this->getElement('block')->find('css', 'img')->getAttribute('src'); |
|
| 23 | } |
|
| 24 | ||
| 25 | /** |
|
| 26 | * {@inheritdoc} |
|
| 27 | */ |
|
| 28 | protected function getDefinedElements() |
|
| 29 | { |
|
| 30 | return array_merge(parent::getDefinedElements(), [ |
|
| 31 | 'block' => '#lakion_sylius_cms_block_preview', |
|
| 32 | ]); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * {@inheritdoc} |
|
| 37 | */ |
|
| 38 | public function getRouteName() |
|
| 39 | { |
|
| 40 | return 'lakion_sylius_cms_admin_custom_block_show'; |
|
| 41 | } |
|
| 42 | } |
|
| 43 | ||
| @@ 7-42 (lines=36) @@ | ||
| 4 | ||
| 5 | use Sylius\Behat\Page\SymfonyPage; |
|
| 6 | ||
| 7 | class ShowPage extends SymfonyPage implements ShowPageInterface |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * {@inheritdoc} |
|
| 11 | */ |
|
| 12 | public function getBlockContents() |
|
| 13 | { |
|
| 14 | return $this->getElement('block')->getHtml(); |
|
| 15 | } |
|
| 16 | ||
| 17 | /** |
|
| 18 | * {@inheritdoc} |
|
| 19 | */ |
|
| 20 | public function getBlockImageUrl() |
|
| 21 | { |
|
| 22 | return $this->getElement('block')->find('css', 'img')->getAttribute('src'); |
|
| 23 | } |
|
| 24 | ||
| 25 | /** |
|
| 26 | * {@inheritdoc} |
|
| 27 | */ |
|
| 28 | protected function getDefinedElements() |
|
| 29 | { |
|
| 30 | return array_merge(parent::getDefinedElements(), [ |
|
| 31 | 'block' => '#lakion_sylius_cms_block_preview', |
|
| 32 | ]); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * {@inheritdoc} |
|
| 37 | */ |
|
| 38 | public function getRouteName() |
|
| 39 | { |
|
| 40 | return 'lakion_sylius_cms_admin_product_block_show'; |
|
| 41 | } |
|
| 42 | } |
|
| 43 | ||
| @@ 7-42 (lines=36) @@ | ||
| 4 | ||
| 5 | use Sylius\Behat\Page\SymfonyPage; |
|
| 6 | ||
| 7 | class ShowPage extends SymfonyPage implements ShowPageInterface |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * {@inheritdoc} |
|
| 11 | */ |
|
| 12 | public function getBlockContents() |
|
| 13 | { |
|
| 14 | return $this->getElement('block')->getHtml(); |
|
| 15 | } |
|
| 16 | ||
| 17 | /** |
|
| 18 | * {@inheritdoc} |
|
| 19 | */ |
|
| 20 | public function getBlockImageUrl() |
|
| 21 | { |
|
| 22 | return $this->getElement('block')->find('css', 'img')->getAttribute('src'); |
|
| 23 | } |
|
| 24 | ||
| 25 | /** |
|
| 26 | * {@inheritdoc} |
|
| 27 | */ |
|
| 28 | protected function getDefinedElements() |
|
| 29 | { |
|
| 30 | return array_merge(parent::getDefinedElements(), [ |
|
| 31 | 'block' => '#lakion_sylius_cms_block_preview', |
|
| 32 | ]); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * {@inheritdoc} |
|
| 37 | */ |
|
| 38 | public function getRouteName() |
|
| 39 | { |
|
| 40 | return 'lakion_sylius_cms_admin_taxon_block_show'; |
|
| 41 | } |
|
| 42 | } |
|
| 43 | ||