Exemple #1
0
 /**
  * Gets the HTML head entries required by this AJAX XML-RPC client
  *
  * @return SwatHtmlHeadEntrySet a set of SwatHtmlHeadEntry objects
  *                               containing the required JavaScript files
  *                               for an AJAX XML-RPC client.
  */
 public static function getHtmlHeadEntrySet()
 {
     $set = new SwatHtmlHeadEntrySet();
     $yui = new SwatYUI(array('connection'));
     $set->addEntrySet($yui->getHtmlHeadEntrySet());
     $set->addEntry(new SwatJavaScriptHtmlHeadEntry('packages/xml-rpc-ajax/javascript/xml-rpc-ajax.js', self::PACKAGE_ID));
     return $set;
 }
Exemple #2
0
 /**
  * Gets the HTML head entries needed for jQuery
  *
  * @return SwatHtmlHeadEntrySet the HTML head entries needed for jQuery.
  */
 public function getHtmlHeadEntrySet()
 {
     if (!self::$html_head_entries instanceof SwatHtmlHeadEntrySet) {
         $filename = sprintf('jquery-%s.js', self::VERSION);
         self::$html_head_entries = new SwatHtmlHeadEntrySet();
         self::$html_head_entries->addEntry(new SwatJavaScriptHtmlHeadEntry('packages/jquery/javascript/' . $filename));
     }
     return self::$html_head_entries;
 }
Exemple #3
0
 /**
  * Gets site-wide HTML head entries for sites using Blörg
  *
  * Applications may add these head entries to their layout.
  *
  * @return SwatHtmlHeadEntrySet the HTML head entries used by Blörg.
  */
 public static function getHtmlHeadEntrySet(SiteApplication $app)
 {
     $set = new SwatHtmlHeadEntrySet();
     $blorg_base_href = $app->config->blorg->path;
     $recent_posts = new SwatLinkHtmlHeadEntry($blorg_base_href . 'feed', 'alternate', 'application/atom+xml', Blorg::_('Recent Posts'));
     $recent_comments = new SwatLinkHtmlHeadEntry($blorg_base_href . 'feed/comments', 'alternate', 'application/atom+xml', Blorg::_('Recent Comments'));
     $set->addEntry($recent_posts);
     $set->addEntry($recent_comments);
     return $set;
 }
Exemple #4
0
 /**
  * Gets the HTML head entries required by LESS
  *
  * @return SwatHtmlHeadEntrySet a set of SwatHtmlHeadEntry objects
  *                               containing the required JavaScript files
  *                               for client-side LESS.
  */
 public static function getHtmlHeadEntrySet()
 {
     $set = new SwatHtmlHeadEntrySet();
     $set->addEntry('packages/less/javascript/less-1.7.4.js', self::PACKAGE_ID);
     return $set;
 }
Exemple #5
0
 /**
  * Gets site-wide HTML head entries for sites using Pinhole
  *
  * Applications may add these head entries to their layout.
  *
  * @return SwatHtmlHeadEntrySet the HTML head entries used by Pinhole.
  */
 public static function getHtmlHeadEntrySet(SiteApplication $app)
 {
     $set = new SwatHtmlHeadEntrySet();
     $pinhole_base_href = $app->config->pinhole->path;
     $set->addEntry(new SwatLinkHtmlHeadEntry($pinhole_base_href . 'feed', 'alternate', 'application/atom+xml', 'Feed'));
     return $set;
 }