Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function setView( \Aimeos\MW\View\Iface $view ) |
||
29 | { |
||
30 | $list = array(); |
||
31 | $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'locale/site' ); |
||
32 | |||
33 | $search = $manager->createSearch(); |
||
34 | $search->setSortations( array( $search->sort( '+', 'locale.site.label' ) ) ); |
||
35 | |||
36 | foreach( $manager->searchItems( $search ) as $item ) { |
||
37 | $list[$item->getCode()] = $item->getLabel(); |
||
38 | } |
||
39 | |||
40 | $view->sitesList = $list; |
||
41 | |||
42 | $this->getClient()->setView( $view ); |
||
43 | return $this; |
||
44 | } |
||
45 | } |
||
46 |