/** * Get theme model by theme path and area code * * @param string $themePath * @param string $areaCode * @return \Magento\Framework\View\Design\ThemeInterface */ public function getThemeModel($themePath, $areaCode) { if ($this->appState->isInstalled()) { $themeModel = $this->flyweightFactory->create($themePath, $areaCode); } else { $themeModel = $this->themeList->getThemeByFullPath($areaCode . '/' . $themePath); } return $themeModel; }
public function addAllAt($index, ListInterface $list) { foreach ($list as $element) { $this->doCheckValid($element); } $start = array_slice($this->elements, 0, $index); $end = array_slice($this->elements, $index); $this->elements = array_merge($start, $list->toArray(), $end); }
/** * Iterator Constructor. * @param ListInterface $list The list to iterate */ public function __construct(ListInterface $list) { $this->list = $list; $this->index = 0; $this->count = $list->count(); }