public function getTheme(\Shopware\Models\Shop\Template $template) { if ($template->getParent() === null) { return $this->getBareTheme(); } else { return $this->getResponsiveTheme(); } }
/** * Helper function which creates an array with all shop templates * inside which should be included in the frontend inheritance. * * @param Shop\Template $template * @return array */ private function buildInheritanceRecursive(Shop\Template $template) { $hierarchy = array($template); if ($template->getParent() instanceof Shop\Template) { $hierarchy = array_merge($hierarchy, $this->buildInheritanceRecursive($template->getParent())); } return $hierarchy; }
/** * {@inheritDoc} */ public function getParent() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getParent', array()); return parent::getParent(); }