Example #1
0
 /**
  * Sets the view object and adds the available languages
  *
  * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output
  * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls
  */
 public function setView(\Aimeos\MW\View\Iface $view)
 {
     $extdir = dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__DIR__))))))));
     $aimeos = new \Aimeos\Bootstrap(array($extdir));
     $view->languagesList = $aimeos->getI18nList('admin');
     $this->getClient()->setView($view);
     return $this;
 }
Example #2
0
 /**
  * Sets the view object and adds the available sites and languages
  *
  * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output
  * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls
  */
 public function setView(\Aimeos\MW\View\Iface $view)
 {
     $sites = array();
     $aimeos = new \Aimeos\Bootstrap();
     $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'locale/site');
     $search = $manager->createSearch();
     $search->setSortations(array($search->sort('+', 'locale.site.label')));
     foreach ($manager->searchItems($search) as $siteItem) {
         $sites[$siteItem->getCode()] = $siteItem->getLabel();
     }
     $view->pageSites = $sites;
     $view->pageLanguages = $aimeos->getI18nList('admin');
     $this->getClient()->setView($view);
     return $this;
 }