/** * @return array */ public function getChoices() { $sites = $this->sitePool->getSites(); $choices = array(); foreach ($sites as $site) { $choices[$site->getId()] = $site->getName(); } return $choices; }
/** * @return array */ public function getSites() { return $this->sitePool->getSites(); }
public function getNewInstance() { $object = parent::getNewInstance(); $object->setSite($this->sitePool->getCurrentSite($this->getRequest())); return $object; }
/** * Returns list of available contexts * * @return array */ public function getContextList() { $criteria = array('site' => $this->sitePool->getCurrentSite($this->getRequest())); return $this->contextManager->findBy($criteria, array('name' => 'asc')); }