コード例 #1
0
 private function _loggerPostfix(tubepress_api_theme_ThemeInterface $theme)
 {
     return sprintf('Theme <code>%s</code> version <code>%s</code>', $theme->getName(), $theme->getVersion());
 }
コード例 #2
0
 private function _recursivelyGetFromTheme(tubepress_api_theme_ThemeInterface $theme, $getter)
 {
     $toReturn = $theme->{$getter}($this->_environment->getBaseUrl(), $this->_environment->getUserContentUrl());
     $parentThemeName = $theme->getParentThemeName();
     if (!$parentThemeName) {
         return $toReturn;
     }
     $theme = $this->_themeRegistry->getInstanceByName($parentThemeName);
     if (!$theme) {
         return $toReturn;
     }
     $fromParent = $this->_recursivelyGetFromTheme($theme, $getter);
     if (is_array($fromParent)) {
         $toReturn = array_merge($fromParent, $toReturn);
     } else {
         $toReturn = $fromParent . $toReturn;
     }
     return $toReturn;
 }
コード例 #3
0
ファイル: ThemeField.php プロジェクト: tubepress/tubepress
 private function _buildThemeData(tubepress_api_theme_ThemeInterface $theme)
 {
     $raw = array('authors' => $theme->getAuthors(), 'description' => $theme->getDescription(), 'license' => $theme->getLicense(), 'screenshots' => $theme->getScreenshots(), 'support' => array('demo' => $theme->getDemoUrl(), 'homepage' => $theme->getHomepageUrl(), 'docs' => $theme->getDocumentationUrl(), 'download' => $theme->getDownloadUrl(), 'bugs' => $theme->getBugTrackerUrl(), 'forum' => $theme->getForumUrl(), 'sourceCode' => $theme->getSourceCodeUrl()), 'version' => $theme->getVersion());
     return $this->_deepToString($raw);
 }