Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. 741 /**
  2. 742 * Find the closest physical theme among ancestors and a theme itself
  3. 743 *
  4. 744 * @param MagentoFrameworkViewDesignThemeInterface $theme
  5. 745 * @return MagentoThemeModelTheme
  6. 746 * @throws MagentoFrameworkExceptionLocalizedException
  7. 747 */
  8. 748 protected function _getPhysicalTheme(MagentoFrameworkViewDesignThemeInterface $theme)
  9. 749 {
  10. 750 $result = $theme;
  11. 751 while ($result->getId() && !$result->isPhysical()) {
  12. 752 $result = $result->getParentTheme();
  13. 753 }
  14. 754 if (!$result) {
  15. 755 throw new MagentoFrameworkExceptionLocalizedException(
  16. 756 new MagentoFrameworkPhrase(
  17. 757 'Unable to find a physical ancestor for a theme '%1'.',
  18. 758 [$theme->getThemeTitle()]
  19. 759 )
  20. 760 );
  21. 761 }
  22. 762 return $result;
  23. 763 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement